]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/52xx: Mark gpt driver as not removable
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sun, 12 Jun 2022 21:34:00 +0000 (23:34 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 18 Jul 2022 13:35:25 +0000 (23:35 +1000)
commitfa518506d03f7c4a6f6feb096a860d86673581c2
tree4d94949bab3bd51077d7e513fe5620895372ac89
parent2ecbe6daef2d2b7ff8f0a1b07a2bea4b398408ef
powerpc/52xx: Mark gpt driver as not removable

Returning an error code (here -EBUSY) from a remove callback doesn't
prevent the driver from being unloaded. The only effect is that an error
message is emitted and the driver is removed anyhow.

So instead drop the remove function (which is equivalent to returning zero)
and set the suppress_bind_attrs property to make it impossible to unload
the driver via sysfs.

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>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220612213400.159257-1-u.kleine-koenig@pengutronix.de
arch/powerpc/platforms/52xx/mpc52xx_gpt.c