]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/platforms/83xx/suspend: Prevent unloading the driver
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 7 Jul 2022 06:14:40 +0000 (08:14 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 28 Jul 2022 06:22:14 +0000 (16:22 +1000)
commitc52b8b0142db9ace1e55d0311de0c3af50804ef7
tree51a620560058e202827cfcfe233ee07d499bfed3
parent01fa0a14b66be57a1e31208a043dced2196cdb79
powerpc/platforms/83xx/suspend: Prevent unloading the driver

Returning an error in .remove() doesn't prevent a driver from being
unloaded. On unbind this only results in an error message, but the
device is remove anyhow.

I guess the author's idea of just returning -EPERM in .remove() was to
prevent unbinding a device. To achieve that set the suppress_bind_attrs
driver property and drop the useless .remove callback.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: Scott Wood <oss@buserror.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220707061441.193869-2-u.kleine-koenig@pengutronix.de
arch/powerpc/platforms/83xx/suspend.c