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 B5D1ECD4F25 for ; Tue, 12 May 2026 13:08:10 +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=QY3pUOBVcNc2UI6pJ1NXMdUz5cR5U1YZthBSs1iC3Z0=; b=gsaorDdLYZacbD C1rT1wyDf3f531B9DxFrEZfShFGih3idVxL3WRZe0QbiZUdfAe9RJ+dV7uqlf9oRFLlhb30SQZka5 tiwZia1vZEz2B0Cq6gijx8LXxg58MQXGAg+5ANeb40VoieRdtDE9N5+0RPnuC2sOGlnKtRqGrPZD1 /i28bLCQSanc11qfbYq7OM3xRHug8zF2s3UjJVZTGF+YxPeLMwQ9D0iFpUuJz5AXTCjJji0wya3tF LU4olngY53vztDNsfm8fUJCbrVNpvzTReKFedBAbKE3coehtB+fgP052tebSWntg4pwcve+UfeVnR MS0lRTxNOfk806MbdCdw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wMmqI-0000000Gm66-1tXW; Tue, 12 May 2026 13:08:10 +0000 Received: from mgamail.intel.com ([198.175.65.13]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wMmqG-0000000GkUU-1Ub1 for linux-phy@lists.infradead.org; Tue, 12 May 2026 13:08:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1778591288; x=1810127288; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=DFpP2BywYHyUrUe3gUXm2RcGaGgJHXXxZahrn5QB5vw=; b=gvsUYCn6TsSl3UzmSKrQI3TsOyE6/FaqBghFmraOjseytdCmaTt3JpNz zvsawTXY1mGbXHbkHcl5rXtGZ7+Qyi7F4NjgZRuxbSzg37C4QA+dQ0+2W 0dJZiDLtr2vGeszJuTRjxJOlVIjxRtH4DSCj54yxQBPUaMtXg0cBmSUuw Nk/xTDK6RK9cpbgNwa4j5nFmUXBaWO4R+t/y5sknBx9X3IlOINUSZ0N6y 0/EL/Fqj7em1ncyeV2iaWJpBGz8He1yBBiWsVRTFOWcm4jo9bzwSwNJNw YitCgqrd6iZRgEEwqkOxyDAh2Bcj7c8E36ur9pyOFPfAXCrq3mdFTae/3 w==; X-CSE-ConnectionGUID: kp0X57y5Rv2qT7CBYaJlLg== X-CSE-MsgGUID: 2Ao3icBFQi2I9SCre2C0sQ== X-IronPort-AV: E=McAfee;i="6800,10657,11783"; a="90600361" X-IronPort-AV: E=Sophos;i="6.23,230,1770624000"; d="scan'208";a="90600361" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2026 06:06:00 -0700 X-CSE-ConnectionGUID: iU50rI4sSTeEvqb/tFGa9w== X-CSE-MsgGUID: qQdk7x+jRguKr//SLma6Mw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,230,1770624000"; d="scan'208";a="233294182" Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa006.fm.intel.com with ESMTP; 12 May 2026 06:05:56 -0700 Received: by black.igk.intel.com (Postfix, from userid 1003) id 794709D; Tue, 12 May 2026 15:05:55 +0200 (CEST) From: Andy Shevchenko To: Peng Fan , 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 v4 3/5] phy: phy-can-transceiver: Move OF ID table closer to their user Date: Tue, 12 May 2026 15:01:51 +0200 Message-ID: <20260512130552.272476-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260512130552.272476-1-andriy.shevchenko@linux.intel.com> References: <20260512130552.272476-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260512_060808_437633_FFDDE94A X-CRM114-Status: GOOD ( 12.54 ) 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 | 58 +++++++++++++++---------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/drivers/phy/phy-can-transceiver.c b/drivers/phy/phy-can-transceiver.c index 5cfd09735204..23655956ace8 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) { @@ -232,6 +203,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 = { -- 2.50.1 -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy