From patchwork Tue Oct 17 20:44:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13426088 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C10A22E3EA for ; Tue, 17 Oct 2023 20:47:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D903FE for ; Tue, 17 Oct 2023 13:47:10 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qsqxz-0001ng-TJ; Tue, 17 Oct 2023 22:47:03 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qsqxz-002Ol1-5p; Tue, 17 Oct 2023 22:47:03 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qsqxy-000U0T-Sk; Tue, 17 Oct 2023 22:47:02 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Greg Kroah-Hartman Cc: Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Michael Grzeschik , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, Arnd Bergmann , 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 Message-ID: <20231017204442.1625925-9-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231017204442.1625925-8-u.kleine-koenig@pengutronix.de> References: <20231017204442.1625925-8-u.kleine-koenig@pengutronix.de> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1393; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=mpvgj1llyBVWOOzIBF8fKXJk/Vs2sDy0eEPp/iHWodA=; b=owGbwMvMwMXY3/A7olbonx/jabUkhlS9T/ZsObv4xOUSV85bdf1qhKrY71L3/K98Gk12QsrOO Xs1HzzoZDRmYWDkYpAVU2Sxb1yTaVUlF9m59t9lmEGsTCBTGLg4BWAiJ7rY/+e9reP1aeZVNzea c0PGdLM/iy1ngVXHHVtXTTXl1DmhL1cvrZl8Yd/OJTHJF89tnNZbYmjSzd/u4XdsRsJBWzkf4SK 2KxLXnGNudh3JWH6rQS6bzVrjWcbLXQocgbN7hdf9y2I7Jnp557ktrellj+Yef9bgLss197P8mq QspS9PZ9SXf3z+K6pl/jP5AB32ujvljXN9K053sqbHHOp/unzxPbu7v4ra3SX6nb/2SGf8883QO 3tn9U/56zcs2h9Ny2tYJVNZUBrnpmrbwfwirMW0d9qWPTVGeXL/eL8vLznAyBrD1bCnJ2XPXu6d gWb+8y8rLL4zLVClT1Jso+RlpT8CqiY130NkfmpydzIDAA== X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-usb@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 --- 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"); From patchwork Tue Oct 17 20:44:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13426087 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33F422E3E5 for ; Tue, 17 Oct 2023 20:47:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BE81BA for ; Tue, 17 Oct 2023 13:47:09 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qsqy0-0001nh-VN; Tue, 17 Oct 2023 22:47:04 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qsqxz-002Ol4-ED; Tue, 17 Oct 2023 22:47:03 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qsqxz-000U0X-5D; Tue, 17 Oct 2023 22:47:03 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Greg Kroah-Hartman Cc: Li Yang , linux-usb@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kernel@pengutronix.de, Arnd Bergmann , linux-kbuild@vger.kernel.org Subject: [PATCH 2/6] usb: gadget: fsl-udc: Convert to use module_platform_driver() Date: Tue, 17 Oct 2023 22:44:45 +0200 Message-ID: <20231017204442.1625925-10-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231017204442.1625925-8-u.kleine-koenig@pengutronix.de> References: <20231017204442.1625925-8-u.kleine-koenig@pengutronix.de> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1448; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=bqTWPGwzIMLwkfNPce7loB5RVG7gQl51fgVj1tD+3GU=; b=owGbwMvMwMXY3/A7olbonx/jabUkhlS9Tw6Xult+sGp52F06+OYI//cHC7cqHLm1R9XZ85Dfy eYj+/kndjIaszAwcjHIiimy2DeuybSqkovsXPvvMswgViaQKQxcnAIwkQo39t+s9cGXU9m++YjH /zRz/b8u1WzK5D0mnjrcKScXbdM38WVacSqxgq1jglaeb9t6Jgv7EDu1n1u0TQUFL78Nu+2wT9L g8smtLPm1QsLFSuunbVHyOX5O0KjWPq6X71eWVASvgmtQ1g6fxz+/CB07FG+cpWMrW5Qlc8bqp+ 5Mjh3t4tULGjoXPFbX71/zI1jYfuanji8+z1fsTbnU1NER3VvRGHf48yztRwutVac1xV5P4nB7n /Z9+xRPJqlFjte4/8ns7hNqyhCo9AhVvvn2wiaNgFNqj7nDeHbaXZk201OKvSTr/MlfWxcrV0ed Cqk1+Oh6klWTYfGirT3HmNe9vlet4Llc8/biEO72S7vtAA== X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-usb@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 --- drivers/usb/gadget/udc/fsl_udc_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); From patchwork Tue Oct 17 20:44:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13426090 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38E432EB02 for ; Tue, 17 Oct 2023 20:47:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E419C4 for ; Tue, 17 Oct 2023 13:47:19 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qsqy2-0001nj-6N; Tue, 17 Oct 2023 22:47:06 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qsqxz-002Ol7-ML; Tue, 17 Oct 2023 22:47:03 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qsqxz-000U0b-DL; Tue, 17 Oct 2023 22:47:03 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Greg Kroah-Hartman Cc: Aaro Koskinen , Alan Stern , Gaosheng Cui , linux-usb@vger.kernel.org, kernel@pengutronix.de, Arnd Bergmann , linux-kbuild@vger.kernel.org Subject: [PATCH 3/6] usb: gadget: fusb300-udc: Convert to use module_platform_driver() Date: Tue, 17 Oct 2023 22:44:46 +0200 Message-ID: <20231017204442.1625925-11-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231017204442.1625925-8-u.kleine-koenig@pengutronix.de> References: <20231017204442.1625925-8-u.kleine-koenig@pengutronix.de> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1261; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=nA2k8+j8+D4z5GBlUssDGp0rfWBJ2q7zdJlKJ35Bjnk=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlLvJBlm7SGIyK6eD8l5OC3JZ1txsePVhZfCzsr fcuCfjxwPiJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZS7yQQAKCRCPgPtYfRL+ TmEPB/0XAwdwe67usH5WOer+xfpx2lF6TLwn88Vp0LUlSucitf1fIQQXToDJ5tMifGcZCKMhxHb 7mG9IHvbUSKw8z/0mODB0upgxekVibWvIQngqPRYo3zuyEejp9zG+y9qIFJYghmV31dVGAhNMCq hFUH+ZT6Xc7FkemxO9kew1rs1xobKVt2VnJSypehql64+fQYem3C3cLZx5V9nbHfR43FPaNqsHt Z2Rm49pcBqonS1w0XYL78FswLSkY60zzCWTVWn1Bkgw73mtgfsbNW1dTeiGrlEetXMd3QZWUHHP FlxbgnOezHHpVYfR9/0BsSefw1N+uxZl++6P7Dqe0nnQTGwW X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-usb@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 --- drivers/usb/gadget/udc/fusb300_udc.c | 7 ++++--- 1 file 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 @@ static int fusb300_probe(struct platform_device *pdev) } 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); From patchwork Tue Oct 17 20:44:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13426086 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33DE82DF96 for ; Tue, 17 Oct 2023 20:47:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9FF1FA for ; Tue, 17 Oct 2023 13:47:09 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qsqy0-0001ny-Oy; Tue, 17 Oct 2023 22:47:04 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qsqxz-002OlA-Vg; Tue, 17 Oct 2023 22:47:03 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qsqxz-000U0f-ML; Tue, 17 Oct 2023 22:47:03 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Greg Kroah-Hartman Cc: Vladimir Zapolskiy , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, Arnd Bergmann , linux-kbuild@vger.kernel.org Subject: [PATCH 4/6] usb: gadget: lpc32xx-udc: Convert to use module_platform_driver() Date: Tue, 17 Oct 2023 22:44:47 +0200 Message-ID: <20231017204442.1625925-12-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231017204442.1625925-8-u.kleine-koenig@pengutronix.de> References: <20231017204442.1625925-8-u.kleine-koenig@pengutronix.de> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1436; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=sxbp0y/WRYI7u4m1SNALeJ77zvGjqnu7lZYDt8ktbnI=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlLvJD8+ykX40knZvq2p34NQqD/Cl/Mc9/OyrcQ h+PzHXLeOOJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZS7yQwAKCRCPgPtYfRL+ Tjb9B/9x6ytRK5v/+YM/jKR3Oj5x7fUF3Gfxfv3y93nqplJOfo37t1K4u0ulkWC7sEuNHRlqsjv 1JrHm6fb3Ti6w6riFm3HG4EVsqqvfCudeLza/4ielz//jBp9yNVLUyHx28lHIi7n8tvN4nZ2wgO wXdcJLStqH+xTWzqtBTIdDL7qAs0xWKq5PfSU7rOTwZTipLWaYwSYY+njuPJECKep8PtMiQ8iC9 DCTCIUiHQRc++edVAxvY2RkJQECIlTzVLwegi5XAzbnRuz5pxBbLN+oz3cijpvst0zy5fDRE7V+ 1ASslSwz6KQe2nd728HVrVGnKIdeIDe8YbmNVJsQ+kpS0GBa X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-usb@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 --- drivers/usb/gadget/udc/lpc32xx_udc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/lpc32xx_udc.c b/drivers/usb/gadget/udc/lpc32xx_udc.c index fe62db32dd0e..a917cc9a32ab 100644 --- a/drivers/usb/gadget/udc/lpc32xx_udc.c +++ b/drivers/usb/gadget/udc/lpc32xx_udc.c @@ -3254,6 +3254,7 @@ MODULE_DEVICE_TABLE(of, lpc32xx_udc_of_match); #endif static struct platform_driver lpc32xx_udc_driver = { + .probe = lpc32xx_udc_probe, .remove = lpc32xx_udc_remove, .shutdown = lpc32xx_udc_shutdown, .suspend = lpc32xx_udc_suspend, @@ -3264,7 +3265,7 @@ static struct platform_driver lpc32xx_udc_driver = { }, }; -module_platform_driver_probe(lpc32xx_udc_driver, lpc32xx_udc_probe); +module_platform_driver(lpc32xx_udc_driver); MODULE_DESCRIPTION("LPC32XX udc driver"); MODULE_AUTHOR("Kevin Wells "); From patchwork Tue Oct 17 20:44:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13426089 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7CBFB2E3EA for ; Tue, 17 Oct 2023 20:47:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43467C6 for ; Tue, 17 Oct 2023 13:47:15 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qsqy1-0001nz-Cc; Tue, 17 Oct 2023 22:47:05 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qsqy0-002OlE-5j; Tue, 17 Oct 2023 22:47:04 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qsqxz-000U0j-Si; Tue, 17 Oct 2023 22:47:03 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Greg Kroah-Hartman Cc: Yoshihiro Shimoda , Pavel Machek , Paolo Abeni , "Steven Rostedt (Google)" , Aaro Koskinen , linux-usb@vger.kernel.org, kernel@pengutronix.de, Arnd Bergmann , linux-kbuild@vger.kernel.org Subject: [PATCH 5/6] usb: gadget: m66592-udc: Convert to use module_platform_driver() Date: Tue, 17 Oct 2023 22:44:48 +0200 Message-ID: <20231017204442.1625925-13-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231017204442.1625925-8-u.kleine-koenig@pengutronix.de> References: <20231017204442.1625925-8-u.kleine-koenig@pengutronix.de> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1272; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=7iG+7YHkjXyb8dJ/SKwln8ra7wbimjCSB/o9LaESEkQ=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlLvJERJ72oT7SW8wEwuuhuHcE3wi8xb8q9D/ee QOxBJIyzvCJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZS7yRAAKCRCPgPtYfRL+ TtNsB/9+pKqFO/XZfoq5tUTRiQ1TFiQZ/sqwT5ehdbyhQ/MhejSVDwtIbUm7sb7qPYwc9b5yUMW KAdfFml7DB93X8KSdafB9mEwOz6mrD4dz/hcjrg4Ay7zv801n9fCk/ixDfnbDQSC67UUOfsLL7D bVKvznCDgysFI1PCS59syr+9ENlevrs3bV0D2e2efcQutaZeZr0IL4fnf9KTG4M2R3Jh36N4IT9 FjoTQuV7v35VW9V7JGgyyozCIayu3vuPFyIvsyp5ZnMqYldmpjZDliVtFop5J+eJ4nZb7YCyHmj yo7dl3n2N0Hp+zS+mJII9WsjY6HNB8yhfgn/o4t/Tj0ir+94 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-usb@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 --- drivers/usb/gadget/udc/m66592-udc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/m66592-udc.c b/drivers/usb/gadget/udc/m66592-udc.c index e05f45a4b56b..bfaa5291e6c8 100644 --- a/drivers/usb/gadget/udc/m66592-udc.c +++ b/drivers/usb/gadget/udc/m66592-udc.c @@ -1687,10 +1687,11 @@ static int m66592_probe(struct platform_device *pdev) /*-------------------------------------------------------------------------*/ static struct platform_driver m66592_driver = { + .probe = m66592_probe, .remove_new = m66592_remove, .driver = { .name = udc_name, }, }; -module_platform_driver_probe(m66592_driver, m66592_probe); +module_platform_driver(m66592_driver); From patchwork Tue Oct 17 20:44:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13426085 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33DAC2D055 for ; Tue, 17 Oct 2023 20:47:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEA25C6 for ; Tue, 17 Oct 2023 13:47:09 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qsqy1-0001o9-13; Tue, 17 Oct 2023 22:47:05 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qsqy0-002OlH-Jh; Tue, 17 Oct 2023 22:47:04 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qsqy0-000U0o-Af; Tue, 17 Oct 2023 22:47:04 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Greg Kroah-Hartman Cc: Yoshihiro Shimoda , linux-usb@vger.kernel.org, kernel@pengutronix.de, Arnd Bergmann , linux-kbuild@vger.kernel.org Subject: [PATCH 6/6] usb: gadget: r8a66597-udc: Convert to use module_platform_driver() Date: Tue, 17 Oct 2023 22:44:49 +0200 Message-ID: <20231017204442.1625925-14-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231017204442.1625925-8-u.kleine-koenig@pengutronix.de> References: <20231017204442.1625925-8-u.kleine-koenig@pengutronix.de> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1376; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=hmCs6GQJ9PQNn9F0oC3I7VQKpEK2vqKFH07tHtk9jF8=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlLvJF6LvS12uP9fXIZxt6tIWT0JttYmuuqiuqE XEK9SHM/dmJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZS7yRQAKCRCPgPtYfRL+ Tt5BCACIqJxsgXbEWmAo7egPaS++9z7i/Ea/BcVrJyE2ABrvqLk1RLGDeK+Jv7+zEGuKBdW37XI wC9pjGiTeyXex24I7H94IY0BtgPBbFuJAYARc1E6V3eHBFIpC1yzFTm980UwmxOQfICE0u9TXhb ryODcWz0CpPOshKmOsyQ0/QgLR8dd2mhDxovEQ/GcjWIBQoHkm/FZPWlOiSuL+mXWI9SYW5tUbz vAA14MPNs5D8YIv4R75ZLESHXU+NzCD1D78Brwj4m1OaJnCoLGZnIimM5QnB2MNxywotM2ovgPA 6eh/zknH6BIFzatOySodjIkiGBjNsyzEhva3vXOmpq89nqwn X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-usb@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 --- drivers/usb/gadget/udc/r8a66597-udc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/r8a66597-udc.c b/drivers/usb/gadget/udc/r8a66597-udc.c index 51b665f15c8e..db4a10a979f9 100644 --- a/drivers/usb/gadget/udc/r8a66597-udc.c +++ b/drivers/usb/gadget/udc/r8a66597-udc.c @@ -1964,13 +1964,14 @@ static int r8a66597_probe(struct platform_device *pdev) /*-------------------------------------------------------------------------*/ static struct platform_driver r8a66597_driver = { + .probe = r8a66597_probe, .remove_new = r8a66597_remove, .driver = { .name = udc_name, }, }; -module_platform_driver_probe(r8a66597_driver, r8a66597_probe); +module_platform_driver(r8a66597_driver); MODULE_DESCRIPTION("R8A66597 USB gadget driver"); MODULE_LICENSE("GPL");