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 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 A77A6FF6E71 for ; Tue, 17 Mar 2026 20:30:30 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JK1VEveNh1CYSkfpnYn+lpB9TSZhnOCQ2xWhnfHXMqQ=; b=ljKali0F6Jn/Uj lk3qh2P9c1yXUllF4mK3g6iWqLoTwEUlbny7Bb4yYzcmrq7AF4TTGG23QqbLji0bOyz411ZC4+27j 2SN/Y+HY2bW6PUC4aA2+B0niKfjIdh1eptHRyaMTtnvmvvhCi4wW6G3DDrfSitzZ3gkvpzKBElgKu 3+wVdhD4wqRMXJPK45yw91GWTG16HzvkEiGNwCYy1Bb4KHCiTCKHj1F79pcnoU6lfHKmq1OTl80eZ Uzgyc2PwjH1jw4xFx0rOATxwdCICoycWl50ZVu9Ki/mUmvTxnOFoArzW+JuU8Ot+B0Lf0UwIvQY+j rzhJwZ1OVn2brsgICPEQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1w2b3e-00000007Cff-1i2E; Tue, 17 Mar 2026 20:30:30 +0000 Received: from mgamail.intel.com ([192.198.163.13]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1w2b3b-00000007Cdl-3P7r for linux-phy@lists.infradead.org; Tue, 17 Mar 2026 20:30:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1773779428; x=1805315428; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Oq3l+I9h8bxaIHyJ/kIHrAomOtzhSbrAao5gin/3sdQ=; b=e+mY11yV0Pqng/k2DuqAJ0eEvDZkFZWM8dJSaEUJGYMVzBGRuz7hUZYw svA5Ec/M0EewgHbm/izp2ZToUc8vhU1bEk64N7B0bZFxFQfDz0cm2ZEY4 bXwIBjx+XoMPjYkoSiVI1jt35ZU9bKPaE3vwnMhAJBEC/ChcJdnZ3uT6x G2lwVSLdPlgUecxdfff7y2kCrgMJ/282jwQMOTxlVtbqp2A3dh9Q5CgB2 5DTRgBS4V0+V4wD99XczHe0DvqKqbhr5YgYrvbX4Uj/FQ9Q9iZ2AXOqgg COJYCdAOP3gzqW6xj483MFtsOzmHbz4ZKh9PfL7d9pS6kff1j7u58qMWm g==; X-CSE-ConnectionGUID: ho9EpgeyRA6r9wUhFUhj7g== X-CSE-MsgGUID: /rR22sETRVSCKQkRR29oMw== X-IronPort-AV: E=McAfee;i="6800,10657,11732"; a="77433963" X-IronPort-AV: E=Sophos;i="6.23,126,1770624000"; d="scan'208";a="77433963" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2026 13:30:24 -0700 X-CSE-ConnectionGUID: Xd0iMxh0TtG2dbBYlEslmg== X-CSE-MsgGUID: s1IOXLqmTaa7kjpD9F72uQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,126,1770624000"; d="scan'208";a="222434442" Received: from black.igk.intel.com ([10.91.253.5]) by orviesa008.jf.intel.com with ESMTP; 17 Mar 2026 13:30:22 -0700 Received: by black.igk.intel.com (Postfix, from userid 1003) id 094F499; Tue, 17 Mar 2026 21:30:20 +0100 (CET) From: Andy Shevchenko To: linux-can@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Marc Kleine-Budde , Vincent Mailhol , Vinod Koul , Neil Armstrong , Josua Mayer , Ulf Hansson , Andy Shevchenko Subject: [PATCH v2 2/4] phy: phy-can-transceiver: Move OF ID table closer to their user Date: Tue, 17 Mar 2026 21:27:28 +0100 Message-ID: <20260317203001.2108568-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260317203001.2108568-1-andriy.shevchenko@linux.intel.com> References: <20260317203001.2108568-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260317_133027_861840_98EEEED6 X-CRM114-Status: GOOD ( 12.45 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org There is no code that uses ID table directly, except the struct device_driver at the end of the file. Hence, move table closer to its user. It's always possible to access them via a pointer. Signed-off-by: Andy Shevchenko --- drivers/phy/phy-can-transceiver.c | 59 +++++++++++++++---------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/drivers/phy/phy-can-transceiver.c b/drivers/phy/phy-can-transceiver.c index 80eece74f77d..aaed8d08fcf0 100644 --- a/drivers/phy/phy-can-transceiver.c +++ b/drivers/phy/phy-can-transceiver.c @@ -97,35 +97,6 @@ static const struct can_transceiver_data tja1057_drvdata = { .flags = CAN_TRANSCEIVER_SILENT_PRESENT, }; -static const struct of_device_id can_transceiver_phy_ids[] = { - { - .compatible = "ti,tcan1042", - .data = &tcan1042_drvdata - }, - { - .compatible = "ti,tcan1043", - .data = &tcan1043_drvdata - }, - { - .compatible = "nxp,tja1048", - .data = &tja1048_drvdata - }, - { - .compatible = "nxp,tja1051", - .data = &tja1051_drvdata - }, - { - .compatible = "nxp,tja1057", - .data = &tja1057_drvdata - }, - { - .compatible = "nxp,tjr1443", - .data = &tcan1043_drvdata - }, - { } -}; -MODULE_DEVICE_TABLE(of, can_transceiver_phy_ids); - static struct phy *can_transceiver_phy_xlate(struct device *dev, const struct of_phandle_args *args) { @@ -229,6 +200,35 @@ static int can_transceiver_phy_probe(struct platform_device *pdev) return PTR_ERR_OR_ZERO(phy_provider); } +static const struct of_device_id can_transceiver_phy_ids[] = { + { + .compatible = "ti,tcan1042", + .data = &tcan1042_drvdata + }, + { + .compatible = "ti,tcan1043", + .data = &tcan1043_drvdata + }, + { + .compatible = "nxp,tja1048", + .data = &tja1048_drvdata + }, + { + .compatible = "nxp,tja1051", + .data = &tja1051_drvdata + }, + { + .compatible = "nxp,tja1057", + .data = &tja1057_drvdata + }, + { + .compatible = "nxp,tjr1443", + .data = &tcan1043_drvdata + }, + { } +}; +MODULE_DEVICE_TABLE(of, can_transceiver_phy_ids); + static struct platform_driver can_transceiver_phy_driver = { .probe = can_transceiver_phy_probe, .driver = { @@ -236,7 +236,6 @@ static struct platform_driver can_transceiver_phy_driver = { .of_match_table = can_transceiver_phy_ids, }, }; - module_platform_driver(can_transceiver_phy_driver); MODULE_AUTHOR("Faiz Abbas "); -- 2.50.1 -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy