Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Uwe Kleine-König and committed by
Greg Kroah-Hartman
b4822e23 ff8e4630

+2 -1
+2 -1
drivers/usb/gadget/udc/m66592-udc.c
··· 1687 1687 1688 1688 /*-------------------------------------------------------------------------*/ 1689 1689 static struct platform_driver m66592_driver = { 1690 + .probe = m66592_probe, 1690 1691 .remove_new = m66592_remove, 1691 1692 .driver = { 1692 1693 .name = udc_name, 1693 1694 }, 1694 1695 }; 1695 1696 1696 - module_platform_driver_probe(m66592_driver, m66592_probe); 1697 + module_platform_driver(m66592_driver);