Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Uwe Kleine-König and committed by
Dmitry Torokhov
39e4e75a af98ff04

+8 -6
+3 -1
drivers/input/touchscreen/tsc2004.c
··· 45 45 46 46 static int tsc2004_remove(struct i2c_client *i2c) 47 47 { 48 - return tsc200x_remove(&i2c->dev); 48 + tsc200x_remove(&i2c->dev); 49 + 50 + return 0; 49 51 } 50 52 51 53 static const struct i2c_device_id tsc2004_idtable[] = {
+3 -1
drivers/input/touchscreen/tsc2005.c
··· 66 66 67 67 static int tsc2005_remove(struct spi_device *spi) 68 68 { 69 - return tsc200x_remove(&spi->dev); 69 + tsc200x_remove(&spi->dev); 70 + 71 + return 0; 70 72 } 71 73 72 74 #ifdef CONFIG_OF
+1 -3
drivers/input/touchscreen/tsc200x-core.c
··· 577 577 } 578 578 EXPORT_SYMBOL_GPL(tsc200x_probe); 579 579 580 - int tsc200x_remove(struct device *dev) 580 + void tsc200x_remove(struct device *dev) 581 581 { 582 582 struct tsc200x *ts = dev_get_drvdata(dev); 583 583 584 584 sysfs_remove_group(&dev->kobj, &tsc200x_attr_group); 585 585 586 586 regulator_disable(ts->vio); 587 - 588 - return 0; 589 587 } 590 588 EXPORT_SYMBOL_GPL(tsc200x_remove); 591 589
+1 -1
drivers/input/touchscreen/tsc200x-core.h
··· 74 74 int tsc200x_probe(struct device *dev, int irq, const struct input_id *tsc_id, 75 75 struct regmap *regmap, 76 76 int (*tsc200x_cmd)(struct device *dev, u8 cmd)); 77 - int tsc200x_remove(struct device *dev); 77 + void tsc200x_remove(struct device *dev); 78 78 79 79 #endif