From mboxrd@z Thu Jan 1 00:00:00 1970 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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 42DB2C6FD1F for ; Sun, 19 Mar 2023 17:08:47 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0BB2385982; Sun, 19 Mar 2023 18:08:08 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; secure) header.d=mailbox.org header.i=@mailbox.org header.b="bw131oNC"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="ojniq4/4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 694E585CFA; Sun, 19 Mar 2023 18:07:17 +0100 (CET) Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D87BD85CB5 for ; Sun, 19 Mar 2023 18:05:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.vasut+renesas@mailbox.org Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4PfklT1yQcz9scl; Sun, 19 Mar 2023 18:05:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1679245541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kaQ2FIoGmMea0G4ffBFMVgc7YEciVf19DWeF+S9F8ow=; b=bw131oNChW9GeVwkI3cjJrhinjk1L6JWWbvitFeeX/MSyTxoLBqda+Yru8LJULDrNPWXqF 4z1GDarJudoPFJBxsXqqUtEyJY5YOrL/3/BTrj3+PyMh//WQj1p7dlLmnci779NvG9mQCm YmqvEbc5jtjWIeU3Re27BimvqBRakh3KoV3TsVInCJlPZ8evqp/QR6ce3yiNO/MjrmWl+2 mdKs9Z5izQhP1EeBy1uZFL8PGm2+Kg4waw8i1bqrr3jqaD5zJp+REVhJRPfgdYjpqFFhGF PmGj36+bZz1qnLXC8MyHO9z0XYTGghH4JoxCrHMPK0Cffglc6XeBLHoQEdqcbw== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1679245539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kaQ2FIoGmMea0G4ffBFMVgc7YEciVf19DWeF+S9F8ow=; b=ojniq4/4TVXpx0+dqlKeJuXHsqvUQuhHzET5MxoPrRoNiJ2X2Ha5Qzf4nlKD9Qa6XNEO29 n60YdWR+khjXB6cyNLfgO8+ormlfcvHdSSBlpIn+bKi1DrRiM0sEEAhzO2VxNTOLBiHF9y 5TJCd9sQcPTaaBivfVOrMLTNXToWF1/hQYH5VJFmQk9cvssSvxKEqVimnQmfGYgSmUI5m0 kJRNQJmihOISxgVdeZyDXo4CcAmV/P/y5SVQzYioOp5ZrgdyrKDx8JGQ81vcgN3oQTUWI9 vLE9387rQMYQPTd7tcRHiTdgxhm8IytSJhv/XcIeAR15f/QPB3/9x++7BLyISQ== To: u-boot@lists.denx.de Cc: Marek Vasut , "Ariel D'Alessandro" , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Alex Nemirovsky , Haolin Li , Heinrich Schuchardt , Joe Hershberger , Joel Stanley , Josua Mayer , Michael Trimarchi , Michal Simek , Nate Drude , Neil Armstrong , Radu Pirea , Ramon Fried , Samuel Mendoza-Jonas , Stefan Roese , T Karthik Reddy , Tim Harvey , Vladimir Oltean , u-boot-amlogic@groups.io Subject: [PATCH 36/41] net: phy: genphy: Convert to U_BOOT_PHY_DRIVER() Date: Sun, 19 Mar 2023 18:03:12 +0100 Message-Id: <20230319170317.27711-36-marek.vasut+renesas@mailbox.org> In-Reply-To: <20230319170317.27711-1-marek.vasut+renesas@mailbox.org> References: <20230319170317.27711-1-marek.vasut+renesas@mailbox.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-MBO-RS-ID: d90fa76044949b9c6ec X-MBO-RS-META: q5odx61rwmnmenorfy9xura7jfeczyak X-Rspamd-Queue-Id: 4PfklT1yQcz9scl X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Convert PHY driver to U_BOOT_PHY_DRIVER() macro and drop phy_register() init call. Converted using sed "s@^static struct phy_driver \(.*\)_driver = \+{@U_BOOT_PHY_DRIVER(\L\1) = {" Signed-off-by: Marek Vasut --- Cc: "Ariel D'Alessandro" Cc: "Cédric Le Goater" Cc: "Marek Behún" Cc: Alex Nemirovsky Cc: Haolin Li Cc: Heinrich Schuchardt Cc: Joe Hershberger Cc: Joel Stanley Cc: Josua Mayer Cc: Marek Vasut Cc: Michael Trimarchi Cc: Michal Simek Cc: Nate Drude Cc: Neil Armstrong Cc: Radu Pirea Cc: Ramon Fried Cc: Samuel Mendoza-Jonas Cc: Stefan Roese Cc: T Karthik Reddy Cc: Tim Harvey Cc: Vladimir Oltean Cc: u-boot-amlogic@groups.io --- drivers/net/phy/phy.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 9d5d1494616..b1e9861c6f3 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -451,7 +451,7 @@ int genphy_shutdown(struct phy_device *phydev) return 0; } -static struct phy_driver genphy_driver = { +U_BOOT_PHY_DRIVER(genphy) = { .uid = 0xffffffff, .mask = 0xffffffff, .name = "Generic PHY", @@ -463,11 +463,6 @@ static struct phy_driver genphy_driver = { .shutdown = genphy_shutdown, }; -static int genphy_init(void) -{ - return phy_register(&genphy_driver); -} - static LIST_HEAD(phy_drivers); #ifdef CONFIG_NEEDS_MANUAL_RELOC @@ -514,8 +509,6 @@ int phy_init(void) phy_drv_reloc(drv); #endif - genphy_init(); - return 0; } @@ -576,7 +569,7 @@ static struct phy_driver *generic_for_phy(struct phy_device *phydev) return &gen10g_driver; #endif - return &genphy_driver; + return ll_entry_get(struct phy_driver, genphy, phy_driver); } static struct phy_driver *get_phy_driver(struct phy_device *phydev) -- 2.39.2