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: 13426092 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 80961CDB474 for ; Tue, 17 Oct 2023 20:47:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CoGy4TtcSpqdW23V/aIdQqz4nz8gWHOc0MgWR3ZKnTE=; b=Ul9Aj72amhgCzg fRmvtl0DLXh0FOcqgaWyCpt/YlzJd7DPaxpVflSlm9tmOrv/N+4teobHdhXg/oD0Rfs8a9SwBBXa+ 7cJ6U9s0tqkh7toksjISF326vekHL48LeSROfDrAVWbTlayTBlFE2IYo6SEmajObnWkm9ob94EPlM ybOKZZmG5wP6sRPUXuaHxagEl6URRjX2SPaGiuA0yQoT3mRm7BzNJyPc21/37/7aAu1oYoEN3VeO2 wTbKXR674RQ/q9rJoVx/QmcQIh7q/68tr4459wLGBBAE6GrxppXXXmyaDLkg3FCFcSZZKRSDcyGjL IX8iugspkitVn4N6bYlw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qsqy7-00DEZk-0r; Tue, 17 Oct 2023 20:47:11 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qsqy3-00DEXm-04 for linux-arm-kernel@lists.infradead.org; Tue, 17 Oct 2023 20:47:08 +0000 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 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> 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-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231017_134707_058637_DADEA350 X-CRM114-Status: GOOD ( 14.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Michael Grzeschik , Arnd Bergmann , linux-kbuild@vger.kernel.org, linux-usb@vger.kernel.org, Claudiu Beznea , kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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");