siox: Make remove callback return void

The driver core ignores the return value of the remove callback, so
don't give siox drivers the chance to provide a value.

All siox drivers only allocate devm-managed resources in
.probe, so there is no .remove callback to fix.

Tested-by: Thorsten Scherer <t.scherer@eckelmann.de>
Acked-by: Thorsten Scherer <t.scherer@eckelmann.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20201125093106.240643-3-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Uwe Kleine-König 2020-11-25 10:31:06 +01:00 committed by Greg Kroah-Hartman
parent 07d9a767ae
commit 1c12c27086
2 changed files with 3 additions and 4 deletions

View File

@ -525,12 +525,11 @@ static int siox_remove(struct device *dev)
struct siox_driver *sdriver =
container_of(dev->driver, struct siox_driver, driver);
struct siox_device *sdevice = to_siox_device(dev);
int ret = 0;
if (sdriver->remove)
ret = sdriver->remove(sdevice);
sdriver->remove(sdevice);
return ret;
return 0;
}
static void siox_shutdown(struct device *dev)

View File

@ -36,7 +36,7 @@ bool siox_device_connected(struct siox_device *sdevice);
struct siox_driver {
int (*probe)(struct siox_device *sdevice);
int (*remove)(struct siox_device *sdevice);
void (*remove)(struct siox_device *sdevice);
void (*shutdown)(struct siox_device *sdevice);
/*