Commit df2171c6 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Jonathan Cameron

iio: accel: kxsd9: Make kxsd9_common_remove() return void

Up to now kxsd9_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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: default avatarAlexandru Ardelean <ardeleanalex@gmail.com>
Link: https://lore.kernel.org/r/20211013203223.2694577-5-u.kleine-koenig@pengutronix.deSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent bcf9d61a
......@@ -34,7 +34,9 @@ static int kxsd9_i2c_probe(struct i2c_client *i2c,
static int kxsd9_i2c_remove(struct i2c_client *client)
{
return kxsd9_common_remove(&client->dev);
kxsd9_common_remove(&client->dev);
return 0;
}
static const struct of_device_id kxsd9_of_match[] = {
......
......@@ -34,7 +34,9 @@ static int kxsd9_spi_probe(struct spi_device *spi)
static int kxsd9_spi_remove(struct spi_device *spi)
{
return kxsd9_common_remove(&spi->dev);
kxsd9_common_remove(&spi->dev);
return 0;
}
static const struct spi_device_id kxsd9_spi_id[] = {
......
......@@ -478,7 +478,7 @@ int kxsd9_common_probe(struct device *dev,
}
EXPORT_SYMBOL(kxsd9_common_probe);
int kxsd9_common_remove(struct device *dev)
void kxsd9_common_remove(struct device *dev)
{
struct iio_dev *indio_dev = dev_get_drvdata(dev);
struct kxsd9_state *st = iio_priv(indio_dev);
......@@ -489,8 +489,6 @@ int kxsd9_common_remove(struct device *dev)
pm_runtime_put_noidle(dev);
pm_runtime_disable(dev);
kxsd9_power_down(st);
return 0;
}
EXPORT_SYMBOL(kxsd9_common_remove);
......
......@@ -8,6 +8,6 @@
int kxsd9_common_probe(struct device *dev,
struct regmap *map,
const char *name);
int kxsd9_common_remove(struct device *dev);
void kxsd9_common_remove(struct device *dev);
extern const struct dev_pm_ops kxsd9_dev_pm_ops;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment