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: r8a66597-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-14-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
49537ec7 b4822e23

+2 -1
+2 -1
drivers/usb/gadget/udc/r8a66597-udc.c
··· 1964 1964 1965 1965 /*-------------------------------------------------------------------------*/ 1966 1966 static struct platform_driver r8a66597_driver = { 1967 + .probe = r8a66597_probe, 1967 1968 .remove_new = r8a66597_remove, 1968 1969 .driver = { 1969 1970 .name = udc_name, 1970 1971 }, 1971 1972 }; 1972 1973 1973 - module_platform_driver_probe(r8a66597_driver, r8a66597_probe); 1974 + module_platform_driver(r8a66597_driver); 1974 1975 1975 1976 MODULE_DESCRIPTION("R8A66597 USB gadget driver"); 1976 1977 MODULE_LICENSE("GPL");