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: 1850489 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S95fH5SCHz20cx for ; Wed, 18 Oct 2023 07:48:07 +1100 (AEDT) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4S95fB4YDJz3vZL for ; Wed, 18 Oct 2023 07:48:02 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=pengutronix.de (client-ip=2a0a:edc0:2:b01:1d::104; helo=metis.whiteo.stw.pengutronix.de; envelope-from=ukl@pengutronix.de; receiver=lists.ozlabs.org) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4S95dL4ylxz3c54 for ; Wed, 18 Oct 2023 07:47:16 +1100 (AEDT) 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 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> 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: linuxppc-dev@lists.ozlabs.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , linux-kbuild@vger.kernel.org, linux-usb@vger.kernel.org, Li Yang , kernel@pengutronix.de, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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);