diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-10-17 22:44:46 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-10-21 12:47:24 +0200 |
commit | 017e452e582496a124de87d99c0cece106be6c3c (patch) | |
tree | dc0ab77633b1099ac67dee56c62b7aa4902cf39b /drivers/usb/gadget/udc | |
parent | 2911016a45ca3f711b179e613e58914fde44b7d0 (diff) | |
download | linux-stable-017e452e582496a124de87d99c0cece106be6c3c.tar.gz linux-stable-017e452e582496a124de87d99c0cece106be6c3c.tar.bz2 linux-stable-017e452e582496a124de87d99c0cece106be6c3c.zip |
usb: gadget: fusb300-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-11-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget/udc')
-rw-r--r-- | drivers/usb/gadget/udc/fusb300_udc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/gadget/udc/fusb300_udc.c b/drivers/usb/gadget/udc/fusb300_udc.c index bd03d475f927..873265634ccc 100644 --- a/drivers/usb/gadget/udc/fusb300_udc.c +++ b/drivers/usb/gadget/udc/fusb300_udc.c @@ -1506,10 +1506,11 @@ clean_up: } static struct platform_driver fusb300_driver = { - .remove_new = fusb300_remove, - .driver = { + .probe = fusb300_probe, + .remove_new = fusb300_remove, + .driver = { .name = udc_name, }, }; -module_platform_driver_probe(fusb300_driver, fusb300_probe); +module_platform_driver(fusb300_driver); |