Input: tsc200x - make tsc200x_remove() return void
Up to now tsc200x_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> Link: https://lore.kernel.org/r/20211012153945.2651412-7-u.kleine-koenig@pengutronix.de Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
af98ff045f
commit
39e4e75a9f
@ -45,7 +45,9 @@ static int tsc2004_probe(struct i2c_client *i2c,
|
||||
|
||||
static int tsc2004_remove(struct i2c_client *i2c)
|
||||
{
|
||||
return tsc200x_remove(&i2c->dev);
|
||||
tsc200x_remove(&i2c->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id tsc2004_idtable[] = {
|
||||
|
@ -66,7 +66,9 @@ static int tsc2005_probe(struct spi_device *spi)
|
||||
|
||||
static int tsc2005_remove(struct spi_device *spi)
|
||||
{
|
||||
return tsc200x_remove(&spi->dev);
|
||||
tsc200x_remove(&spi->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
|
@ -577,15 +577,13 @@ disable_regulator:
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tsc200x_probe);
|
||||
|
||||
int tsc200x_remove(struct device *dev)
|
||||
void tsc200x_remove(struct device *dev)
|
||||
{
|
||||
struct tsc200x *ts = dev_get_drvdata(dev);
|
||||
|
||||
sysfs_remove_group(&dev->kobj, &tsc200x_attr_group);
|
||||
|
||||
regulator_disable(ts->vio);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tsc200x_remove);
|
||||
|
||||
|
@ -74,6 +74,6 @@ extern const struct dev_pm_ops tsc200x_pm_ops;
|
||||
int tsc200x_probe(struct device *dev, int irq, const struct input_id *tsc_id,
|
||||
struct regmap *regmap,
|
||||
int (*tsc200x_cmd)(struct device *dev, u8 cmd));
|
||||
int tsc200x_remove(struct device *dev);
|
||||
void tsc200x_remove(struct device *dev);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user