diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-10-17 22:44:45 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-10-21 12:47:24 +0200 |
commit | 2911016a45ca3f711b179e613e58914fde44b7d0 (patch) | |
tree | 6c1dd8b5ed4c5b6eb2b6743e3f402384e48e16e9 /drivers/usb/gadget | |
parent | usb: gadget: at91-udc: Convert to use module_platform_driver() (diff) | |
download | linux-2911016a45ca3f711b179e613e58914fde44b7d0.tar.xz linux-2911016a45ca3f711b179e613e58914fde44b7d0.zip |
usb: gadget: fsl-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-10-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/udc/fsl_udc_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c index ee5705d336e3..2693a10eb0c7 100644 --- a/drivers/usb/gadget/udc/fsl_udc_core.c +++ b/drivers/usb/gadget/udc/fsl_udc_core.c @@ -2666,6 +2666,7 @@ static const struct platform_device_id fsl_udc_devtype[] = { }; MODULE_DEVICE_TABLE(platform, fsl_udc_devtype); static struct platform_driver udc_driver = { + .probe = fsl_udc_probe, .remove = fsl_udc_remove, .id_table = fsl_udc_devtype, /* these suspend and resume are not usb suspend and resume */ @@ -2679,7 +2680,7 @@ static struct platform_driver udc_driver = { }, }; -module_platform_driver_probe(udc_driver, fsl_udc_probe); +module_platform_driver(udc_driver); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_AUTHOR(DRIVER_AUTHOR); |