]> git.baikalelectronics.ru Git - kernel.git/commitdiff
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 0272cedcc726175aab8c4a56ab9e2a7affe3d9ec..9fdd870c4c0bd8b4017f81aeae4770f93f2f54dc 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 923496bbb368d5b248d9fc6f7f51ec1fe4664da0..a2f55920b9b2e184ef740888629ea2b08942617e 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 b8d720d520131a9758c097677f59bd0820d6d2fd..27810f6c69f67900d7419083e6f2e30cca716c67 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 a43c08ccfd3dc0bce3ff578584024b8a1fe028f1..4ded34425b21eef7bbbb8270eb22c1a2e7e823e6 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