From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 36EF22BEC2A; Mon, 4 May 2026 07:01:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777878065; cv=none; b=AawYNXA46ryTr20+YsEv0s++eBGF4ZjQ0lpunqd6OGdFkOB4Sf3ENKviwnN3QSozlPDY2w48V9eXHxZiTIk40ctkgnR3Mre06o8vKhhe6PHsYXZs1Ujk8WHk+lPbldJV88s7KC6nGv2cnuzqm7BQ5fYQgJpBTDP/s+yVl60sGig= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777878065; c=relaxed/simple; bh=8vqSmnbDPc6RNbm1wm/YJrqYsV6ZrW7K+gliVr83sP0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=s9yMq4CEYbBWDR91PnPjVOzB6V783DVhejPtDALqwk02DUeUNRnbCFDR01MacO+CDTDOPt9kJuIzzA9gSJ4vE23bwuoNwMyDOaH1q+VTEba9+kCRS6CzW56Q1UksGgqI+ORHEBvoXUuYIpwgkl5B0+wESPpk4NIoOJIKrA1Xpm4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=VJhhpIYV; arc=none smtp.client-ip=192.198.163.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="VJhhpIYV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1777878064; x=1809414064; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8vqSmnbDPc6RNbm1wm/YJrqYsV6ZrW7K+gliVr83sP0=; b=VJhhpIYVTHZzDWTm4ICz6MGgkWr9Gul3Y4XvGAibP+dCmooB7swTqbrV 4gvnjID29OWD2BepvT5YK+W94piQiywrUAkSbYMX8WQJYyPLzi5xOakzK wNHNt8fqeOrps5ptb8Kq/n29e05GFxcyvn8R86QfdU0ujeouE2KR047v2 FwhUUROsXKcb5fcKf1OM5+sDfTETWsnTYyd5ny0N5iE3Gz/yVF1tmTqSK 8he91iGqo8D+GaWtnRzIT1AcIsNnGxjsS1D7tiLlWtytb4+3VzuZUh78z ieD84v+d+erhP77yXLI+AIIewiW3XhKzURhnBOBOyFVCIf/BzFUMkNWp7 Q==; X-CSE-ConnectionGUID: Ee3ypKw8T1up5NJqd0pciQ== X-CSE-MsgGUID: a3DfWG0LR0y9OpCtIfXBwA== X-IronPort-AV: E=McAfee;i="6800,10657,11775"; a="82582137" X-IronPort-AV: E=Sophos;i="6.23,215,1770624000"; d="scan'208";a="82582137" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2026 00:01:01 -0700 X-CSE-ConnectionGUID: xL2nn0JPTWSFgT+BHhjrMg== X-CSE-MsgGUID: RQ/fE0cWT52+FW0Qf1PzJQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,215,1770624000"; d="scan'208";a="239409102" Received: from black.igk.intel.com ([10.91.253.5]) by orviesa003.jf.intel.com with ESMTP; 04 May 2026 00:00:59 -0700 Received: by black.igk.intel.com (Postfix, from userid 1003) id 39AB49B; Mon, 04 May 2026 09:00:58 +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 v3 2/4] phy: phy-can-transceiver: Move OF ID table closer to their user Date: Mon, 4 May 2026 08:58:53 +0200 Message-ID: <20260504070054.29508-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260504070054.29508-1-andriy.shevchenko@linux.intel.com> References: <20260504070054.29508-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 80eece74f77d..8411d36b463b 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 = { -- 2.50.1