From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Nicolas Ferre <nicolas.ferre@microchip.com>, Alexandre Belloni <alexandre.belloni@bootlin.com>, Claudiu Beznea <claudiu.beznea@tuxon.dev>, Michael Grzeschik <m.grzeschik@pengutronix.de>, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, Arnd Bergmann <arnd@arndb.de>, linux-kbuild@vger.kernel.org Subject: [PATCH 1/6] usb: gadget: at91-udc: Convert to use module_platform_driver() Date: Tue, 17 Oct 2023 22:44:44 +0200 [thread overview] Message-ID: <20231017204442.1625925-9-u.kleine-koenig@pengutronix.de> (raw) In-Reply-To: <20231017204442.1625925-8-u.kleine-koenig@pengutronix.de> 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> --- drivers/usb/gadget/udc/at91_udc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/at91_udc.c b/drivers/usb/gadget/udc/at91_udc.c index 922b4187004b..30ea4a9d5301 100644 --- a/drivers/usb/gadget/udc/at91_udc.c +++ b/drivers/usb/gadget/udc/at91_udc.c @@ -2000,6 +2000,7 @@ static int at91udc_resume(struct platform_device *pdev) #endif static struct platform_driver at91_udc_driver = { + .probe = at91udc_probe, .remove = at91udc_remove, .shutdown = at91udc_shutdown, .suspend = at91udc_suspend, @@ -2010,7 +2011,7 @@ static struct platform_driver at91_udc_driver = { }, }; -module_platform_driver_probe(at91_udc_driver, at91udc_probe); +module_platform_driver(at91_udc_driver); MODULE_DESCRIPTION("AT91 udc driver"); MODULE_AUTHOR("Thomas Rathbone, David Brownell"); -- 2.42.0
WARNING: multiple messages have this Message-ID (diff)
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>, Michael Grzeschik <m.grzeschik@pengutronix.de>, Arnd Bergmann <arnd@arndb.de>, linux-kbuild@vger.kernel.org, linux-usb@vger.kernel.org, Claudiu Beznea <claudiu.beznea@tuxon.dev>, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/6] usb: gadget: at91-udc: Convert to use module_platform_driver() Date: Tue, 17 Oct 2023 22:44:44 +0200 [thread overview] Message-ID: <20231017204442.1625925-9-u.kleine-koenig@pengutronix.de> (raw) In-Reply-To: <20231017204442.1625925-8-u.kleine-koenig@pengutronix.de> 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> --- drivers/usb/gadget/udc/at91_udc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/at91_udc.c b/drivers/usb/gadget/udc/at91_udc.c index 922b4187004b..30ea4a9d5301 100644 --- a/drivers/usb/gadget/udc/at91_udc.c +++ b/drivers/usb/gadget/udc/at91_udc.c @@ -2000,6 +2000,7 @@ static int at91udc_resume(struct platform_device *pdev) #endif static struct platform_driver at91_udc_driver = { + .probe = at91udc_probe, .remove = at91udc_remove, .shutdown = at91udc_shutdown, .suspend = at91udc_suspend, @@ -2010,7 +2011,7 @@ static struct platform_driver at91_udc_driver = { }, }; -module_platform_driver_probe(at91_udc_driver, at91udc_probe); +module_platform_driver(at91_udc_driver); MODULE_DESCRIPTION("AT91 udc driver"); MODULE_AUTHOR("Thomas Rathbone, David Brownell"); -- 2.42.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-10-17 20:47 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-10-17 20:44 [PATCH 0/6] usb: gadget: Convert to use module_platform_driver() Uwe Kleine-König 2023-10-17 20:44 ` Uwe Kleine-König 2023-10-17 20:44 ` Uwe Kleine-König 2023-10-17 20:44 ` Uwe Kleine-König [this message] 2023-10-17 20:44 ` [PATCH 1/6] usb: gadget: at91-udc: " Uwe Kleine-König 2023-10-17 20:44 ` [PATCH 2/6] usb: gadget: fsl-udc: " Uwe Kleine-König 2023-10-17 20:44 ` Uwe Kleine-König 2023-10-17 20:44 ` [PATCH 3/6] usb: gadget: fusb300-udc: " Uwe Kleine-König 2023-10-17 20:44 ` [PATCH 4/6] usb: gadget: lpc32xx-udc: " Uwe Kleine-König 2023-10-17 20:44 ` Uwe Kleine-König 2023-10-17 20:44 ` [PATCH 5/6] usb: gadget: m66592-udc: " Uwe Kleine-König 2023-10-17 20:44 ` [PATCH 6/6] usb: gadget: r8a66597-udc: " Uwe Kleine-König
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20231017204442.1625925-9-u.kleine-koenig@pengutronix.de \ --to=u.kleine-koenig@pengutronix.de \ --cc=alexandre.belloni@bootlin.com \ --cc=arnd@arndb.de \ --cc=claudiu.beznea@tuxon.dev \ --cc=gregkh@linuxfoundation.org \ --cc=kernel@pengutronix.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kbuild@vger.kernel.org \ --cc=linux-usb@vger.kernel.org \ --cc=m.grzeschik@pengutronix.de \ --cc=nicolas.ferre@microchip.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.