Up to now hmc5843_common_remove() returns zero unconditionally. Make it
return void instead which makes it easier to see in the callers that
there is no error to handle.
Also the return value of i2c and spi remove callbacks is ignored anyway.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Link: https://lore.kernel.org/r/20211013203223.2694577-14-u.kleine-koenig@pengutronix.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
int hmc5843_common_probe(struct device *dev, struct regmap *regmap,
enum hmc5843_ids id, const char *name);
-int hmc5843_common_remove(struct device *dev);
+void hmc5843_common_remove(struct device *dev);
int hmc5843_common_suspend(struct device *dev);
int hmc5843_common_resume(struct device *dev);
}
EXPORT_SYMBOL(hmc5843_common_probe);
-int hmc5843_common_remove(struct device *dev)
+void hmc5843_common_remove(struct device *dev)
{
struct iio_dev *indio_dev = dev_get_drvdata(dev);
/* sleep mode to save power */
hmc5843_set_mode(iio_priv(indio_dev), HMC5843_MODE_SLEEP);
-
- return 0;
}
EXPORT_SYMBOL(hmc5843_common_remove);
static int hmc5843_i2c_remove(struct i2c_client *client)
{
- return hmc5843_common_remove(&client->dev);
+ hmc5843_common_remove(&client->dev);
+
+ return 0;
}
static const struct i2c_device_id hmc5843_id[] = {
static int hmc5843_spi_remove(struct spi_device *spi)
{
- return hmc5843_common_remove(&spi->dev);
+ hmc5843_common_remove(&spi->dev);
+
+ return 0;
}
static const struct spi_device_id hmc5843_id[] = {