public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Rosen Penev <rosenp@gmail.com>, linux-wireless@vger.kernel.org
Cc: "Toke Høiland-Jørgensen" <toke@toke.dk>,
	nbd@nbd.name, "Johannes Berg" <johannes@sipsolutions.net>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	"open list" <linux-kernel@vger.kernel.org>,
	"open list:MIPS" <linux-mips@vger.kernel.org>
Subject: Re: [PATCHv4 4/5] wifi: ath9k: ahb: replace id_table with of
Date: Mon, 26 May 2025 06:30:13 +0200	[thread overview]
Message-ID: <297d936b-7ce2-4d9a-baff-e4b0503e6000@kernel.org> (raw)
In-Reply-To: <20250525214256.8637-5-rosenp@gmail.com>

On 25/05/2025 23:42, Rosen Penev wrote:
> @@ -72,20 +55,15 @@ static const struct ath_bus_ops ath_ahb_bus_ops  = {
>  
>  static int ath_ahb_probe(struct platform_device *pdev)
>  {
> -	const struct platform_device_id *id = platform_get_device_id(pdev);
>  	struct ieee80211_hw *hw;
>  	struct ath_softc *sc;
>  	struct ath_hw *ah;
>  	void __iomem *mem;
>  	char hw_name[64];
> +	u16 dev_id;

I don't think these are u16 in the headers, but unsigned int.

>  	int irq;
>  	int ret;
>  
> -	if (!dev_get_platdata(&pdev->dev)) {
> -		dev_err(&pdev->dev, "no platform data specified\n");
> -		return -EINVAL;
> -	}
> -
>  	mem = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(mem)) {
>  		dev_err(&pdev->dev, "ioremap failed\n");
> @@ -118,7 +96,8 @@ static int ath_ahb_probe(struct platform_device *pdev)
>  		goto err_free_hw;
>  	}
>  
> -	ret = ath9k_init_device(id->driver_data, sc, &ath_ahb_bus_ops);
> +	dev_id = (u16)(kernel_ulong_t)of_device_get_match_data(&pdev->dev);

u16 cast looks not needed.


> +	ret = ath9k_init_device(dev_id, sc, &ath_ahb_bus_ops);
>  	if (ret) {
>  		dev_err(&pdev->dev, "failed to initialize device\n");
>  		goto err_irq;
Best regards,
Krzysztof

  reply	other threads:[~2025-05-26  4:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-25 21:42 [PATCHv4 0/5] wifi: ath9k: add ahb OF support Rosen Penev
2025-05-25 21:42 ` [PATCHv4 1/5] wifi: ath9k: ahb: reorder declarations Rosen Penev
2025-05-26  4:27   ` Krzysztof Kozlowski
2025-05-25 21:42 ` [PATCHv4 2/5] wifi: ath9k: ahb: reorder includes Rosen Penev
2025-05-26  4:27   ` Krzysztof Kozlowski
2025-05-25 21:42 ` [PATCHv4 3/5] dt-bindings: net: wireless: ath9k: add WIFI bindings Rosen Penev
2025-05-26  4:26   ` Krzysztof Kozlowski
2025-05-26  5:18     ` Rosen Penev
2025-05-26  5:23   ` Krzysztof Kozlowski
2025-05-25 21:42 ` [PATCHv4 4/5] wifi: ath9k: ahb: replace id_table with of Rosen Penev
2025-05-26  4:30   ` Krzysztof Kozlowski [this message]
2025-05-26  4:59     ` Rosen Penev
2025-05-26  5:03       ` Krzysztof Kozlowski
2025-05-26  5:23   ` Krzysztof Kozlowski
2025-05-25 21:42 ` [PATCHv4 5/5] mips: dts: qca: add wmac support Rosen Penev
2025-05-26  4:26   ` Krzysztof Kozlowski

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=297d936b-7ce2-4d9a-baff-e4b0503e6000@kernel.org \
    --to=krzk@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=johannes@sipsolutions.net \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@nbd.name \
    --cc=robh@kernel.org \
    --cc=rosenp@gmail.com \
    --cc=toke@toke.dk \
    --cc=tsbogend@alpha.franken.de \
    /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