diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-10-17 22:44:48 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-10-21 12:47:24 +0200 |
commit | b4822e2317e8ffb20351ccad544b04d04edc460a (patch) | |
tree | 16be2749b810e887c5b25e7e70a9e961950961a0 /drivers/usb | |
parent | usb: gadget: lpc32xx-udc: Convert to use module_platform_driver() (diff) | |
download | linux-b4822e2317e8ffb20351ccad544b04d04edc460a.tar.xz linux-b4822e2317e8ffb20351ccad544b04d04edc460a.zip |
usb: gadget: m66592-udc: Convert to use module_platform_driver()
module_platform_driver_probe() has the advantage that the .probe() and
.remove() calls can live in .init.text and .exit.text respectively and
so some memory is saved. The downside is that dynamic bind and unbind
are impossible. As the driver doesn't benefit from the advantages (both
.probe and .remove are defined in plain .text), stop suffering from the
downsides and use module_platform_driver() instead of
module_platform_driver_probe().
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20231017204442.1625925-13-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/udc/m66592-udc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/m66592-udc.c b/drivers/usb/gadget/udc/m66592-udc.c index e05f45a4b56b..bfaa5291e6c8 100644 --- a/drivers/usb/gadget/udc/m66592-udc.c +++ b/drivers/usb/gadget/udc/m66592-udc.c @@ -1687,10 +1687,11 @@ clean_up: /*-------------------------------------------------------------------------*/ static struct platform_driver m66592_driver = { + .probe = m66592_probe, .remove_new = m66592_remove, .driver = { .name = udc_name, }, }; -module_platform_driver_probe(m66592_driver, m66592_probe); +module_platform_driver(m66592_driver); |