public inbox for linux-phy@lists.infradead.org
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-can@vger.kernel.org, linux-phy@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	Vincent Mailhol <mailhol@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Josua Mayer <josua@solid-run.com>,
	Ulf Hansson <ulf.hansson@linaro.org>
Subject: Re: [PATCH v2 2/4] phy: phy-can-transceiver: Move OF ID table closer to their user
Date: Sun, 3 May 2026 22:30:53 +0530	[thread overview]
Message-ID: <afd_RXYvsU5OogPX@vaman> (raw)
In-Reply-To: <20260317203001.2108568-3-andriy.shevchenko@linux.intel.com>

On 17-03-26, 21:27, Andy Shevchenko wrote:
> 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 <andriy.shevchenko@linux.intel.com>
> ---
>  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,
>  	},
>  };
> -

This looks like a stray delete?

>  module_platform_driver(can_transceiver_phy_driver);
>  
>  MODULE_AUTHOR("Faiz Abbas <faiz_abbas@ti.com>");
> -- 
> 2.50.1

-- 
~Vinod

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  reply	other threads:[~2026-05-03 17:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-17 20:27 [PATCH v2 0/4] phy: phy-can-transceiver: Ad-hoc cleanups and refactoring Andy Shevchenko
2026-03-17 20:27 ` [PATCH v2 1/4] phy: phy-can-transceiver: Convert to use device property API Andy Shevchenko
2026-04-27 11:26   ` Josua Mayer
2026-03-17 20:27 ` [PATCH v2 2/4] phy: phy-can-transceiver: Move OF ID table closer to their user Andy Shevchenko
2026-05-03 17:00   ` Vinod Koul [this message]
2026-03-17 20:27 ` [PATCH v2 3/4] phy: phy-can-transceiver: Don't check for specific errors when parsing properties Andy Shevchenko
2026-03-17 20:27 ` [PATCH v2 4/4] phy: phy-can-transceiver: Drop unused include Andy Shevchenko
2026-04-27 11:05   ` Josua Mayer
2026-04-14 18:43 ` [PATCH v2 0/4] phy: phy-can-transceiver: Ad-hoc cleanups and refactoring Andy Shevchenko
2026-04-27 11:09   ` Josua Mayer
2026-04-27 13:34     ` Andy Shevchenko
2026-04-27 13:41       ` Josua Mayer
2026-04-27 15:26         ` Andy Shevchenko
2026-05-03 17:01   ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=afd_RXYvsU5OogPX@vaman \
    --to=vkoul@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=josua@solid-run.com \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=mailhol@kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=neil.armstrong@linaro.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox