Input: tsc200x - make tsc200x_remove() return void
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 13 Oct 2021 02:38:36 +0000 (19:38 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 13 Oct 2021 02:48:54 +0000 (19:48 -0700)
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>
drivers/input/touchscreen/tsc2004.c
drivers/input/touchscreen/tsc2005.c
drivers/input/touchscreen/tsc200x-core.c
drivers/input/touchscreen/tsc200x-core.h

index 0272ced..9fdd870 100644 (file)
@@ -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[] = {
index 923496b..a2f5592 100644 (file)
@@ -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
index b8d720d..27810f6 100644 (file)
@@ -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);
 
index a43c08c..4ded344 100644 (file)
@@ -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