Commit 39e4e75a authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Dmitry Torokhov
Browse files

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: default avatarUwe 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: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent af98ff04
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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[] = {
+3 −1
Original line number Diff line number Diff line
@@ -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
+1 −3
Original line number Diff line number Diff line
@@ -577,15 +577,13 @@ int tsc200x_probe(struct device *dev, int irq, const struct input_id *tsc_id,
}
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);

+1 −1
Original line number Diff line number Diff line
@@ -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