From patchwork Tue Oct 17 20:44:43 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: 13426094 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 8BE8BCDB474 for ; Tue, 17 Oct 2023 20:47:44 +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: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:In-Reply-To:References: List-Owner; bh=M4rmERLwa75YqfpBieuf8yIUKs2s8T54XzXdPdM0iH0=; b=w3OoF3BB6Tbwum bK7svcjL+AL+Jm72LTQ2e0pKsEooLFEpFizyn7yrXAVCLSmQXc4El7qHnUKEDKowEeEHyygQI0auw 95/CIlbl7i+8Bv7N9021SM7efD5vIkxGPIXAgHtflDYPP78AaSOe36l4geO8ElYrM98QkEz51qWAT aUtxVJyWwAOXrALuauxgdTT6j9VqKOqXWggtUhUmLMzab0SmAnxmx/C3gyfUHbdmiQ3b32Sl0RXp+ ooloMpFHToY0z6oex8gQbfQF0vrZTBgiX+8ZuwJ+Ae+6+ZtubwA4RDu+eKXwLNmltpfnKWhSMY3qY MwOVR+xf0SccX3oKftoA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qsqyI-00DEeB-0z; Tue, 17 Oct 2023 20:47:22 +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 1qsqy5-00DEYl-0B for linux-arm-kernel@lists.infradead.org; Tue, 17 Oct 2023 20:47:10 +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 1qsqy2-0001nf-7N; 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 1qsqxy-002Oky-V0; Tue, 17 Oct 2023 22:47:02 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qsqxy-000U0Q-LC; Tue, 17 Oct 2023 22:47:02 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Greg Kroah-Hartman Subject: [PATCH 0/6] usb: gadget: Convert to use module_platform_driver() Date: Tue, 17 Oct 2023 22:44:43 +0200 Message-ID: <20231017204442.1625925-8-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1786; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Z/Vn1N315f7fZHcxDG81QUWg0Chp5jm5OkmHHEOJRVE=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlLvI7mPi3t5lSt18AODt6voX5wl6HZGEZUuiLE DhImsw17AuJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZS7yOwAKCRCPgPtYfRL+ ThJEB/9+jgGO1Osx1rWXHL+Yx4I4Ef0vXz+VHQMVy9A2tCCjNre5tivU2+SxAlVa6kI4TZjRtCQ FyAOQnHfLBiNaj8mx5ozuYig8xHBmH//k/z4GzYYiU2HYzP6izmdCC848LHCRcHuqeMwOzLhcyy M28c1WL43/YowvzK/7lpDT9hgjF1n5Ar0s2fyB2dLLvzH8+VPo/933uyq0y+C3IKNKe+tvU8Oth OiDqUV82qBcsLJ+aFXsrweNqjNxZDBZeyL1zdUDYu1dB4YpYjf3ftUbNHhaedzernUoazFkw9m+ +DpbUhtUY7ntNY0dfx4SKZ3KdK3yIE63VeCBUdEqLJHgUjCa 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_134709_095695_82F4D107 X-CRM114-Status: GOOD ( 10.79 ) 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 , Pavel Machek , Arnd Bergmann , Aaro Koskinen , linux-kbuild@vger.kernel.org, Yoshihiro Shimoda , linux-usb@vger.kernel.org, "Steven Rostedt \(Google\)" , Claudiu Beznea , Vladimir Zapolskiy , Alan Stern , kernel@pengutronix.de, Paolo Abeni , Li Yang , linuxppc-dev@lists.ozlabs.org, Gaosheng Cui , 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 Hello, module_platform_driver_probe() is an alternative to module_platform_driver(). Comparing the two the former has the advantage that the probe and remove callbacks can live in .init.text and .exit.text respectively. The latter has the advantage that it's a bit easier to use correctly and you can bind/unbind via sysfs and/or hotplug. There are considerations about deprecating module_platform_driver_probe()[1] as very few drivers use it, still less make actually use of the advantages and saving a few bytes isn't as important any more as it was (say) 10 years ago. Given that the drivers below drivers/usb/gadget making use of module_platform_driver_probe() doesn't benefit from the advantages at all (probe and remove are all defined in .text), convert these drivers to module_platform_driver(). Best regards Uwe [1] https://lore.kernel.org/linux-kbuild/20231017132045.afswdgcv4axjf6jj@pengutronix.de Uwe Kleine-König (6): usb: gadget: at91-udc: Convert to use module_platform_driver() usb: gadget: fsl-udc: Convert to use module_platform_driver() usb: gadget: fusb300-udc: Convert to use module_platform_driver() usb: gadget: lpc32xx-udc: Convert to use module_platform_driver() usb: gadget: m66592-udc: Convert to use module_platform_driver() usb: gadget: r8a66597-udc: Convert to use module_platform_driver() drivers/usb/gadget/udc/at91_udc.c | 3 ++- drivers/usb/gadget/udc/fsl_udc_core.c | 3 ++- drivers/usb/gadget/udc/fusb300_udc.c | 7 ++++--- drivers/usb/gadget/udc/lpc32xx_udc.c | 3 ++- drivers/usb/gadget/udc/m66592-udc.c | 3 ++- drivers/usb/gadget/udc/r8a66597-udc.c | 3 ++- 6 files changed, 14 insertions(+), 8 deletions(-) base-commit: 4d5ab2376ec576af173e5eac3887ed0b51bd8566