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: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20211013203223.2694577-5-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Родитель
bcf9d61a2d
Коммит
df2171c668
|
@ -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 @@ err_power_down:
|
|||
}
|
||||
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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче