diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-07-26 11:14:42 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-08-02 15:22:19 +0300 |
commit | bbfa509d632946578d4f19aa2cedf1ca2f34565d (patch) | |
tree | 83b101a92805e00213ae06fe856cf41bb8ab89f1 /arch/powerpc/platforms/82xx | |
parent | 54f30b83fe627453082f15d83d7820b28b2d24bb (diff) | |
download | linux-bbfa509d632946578d4f19aa2cedf1ca2f34565d.tar.xz |
powerpc/ep8248e: Mark driver as non removable
Instead of resorting to BUG() ensure that the driver isn't unbound by
suppressing its bind and unbind sysfs attributes. As the driver is
built-in there is no way to remove a device once bound.
As a nice side effect this allows to drop the remove function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230726081442.461026-1-u.kleine-koenig@pengutronix.de
Diffstat (limited to 'arch/powerpc/platforms/82xx')
-rw-r--r-- | arch/powerpc/platforms/82xx/ep8248e.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c index 16808536f788..4bfa1a95e155 100644 --- a/arch/powerpc/platforms/82xx/ep8248e.c +++ b/arch/powerpc/platforms/82xx/ep8248e.c @@ -141,12 +141,6 @@ err_free_bus: return ret; } -static int ep8248e_mdio_remove(struct platform_device *ofdev) -{ - BUG(); - return 0; -} - static const struct of_device_id ep8248e_mdio_match[] = { { .compatible = "fsl,ep8248e-mdio-bitbang", @@ -158,9 +152,9 @@ static struct platform_driver ep8248e_mdio_driver = { .driver = { .name = "ep8248e-mdio-bitbang", .of_match_table = ep8248e_mdio_match, + .suppress_bind_attrs = true, }, .probe = ep8248e_mdio_probe, - .remove = ep8248e_mdio_remove, }; struct cpm_pin { |