[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <297d936b-7ce2-4d9a-baff-e4b0503e6000@kernel.org>
Date: Mon, 26 May 2025 06:30:13 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Rosen Penev <rosenp@...il.com>, linux-wireless@...r.kernel.org
Cc: Toke Høiland-Jørgensen <toke@...e.dk>,
nbd@....name, Johannes Berg <johannes@...solutions.net>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>, open list <linux-kernel@...r.kernel.org>,
"open list:MIPS" <linux-mips@...r.kernel.org>
Subject: Re: [PATCHv4 4/5] wifi: ath9k: ahb: replace id_table with of
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
Powered by blists - more mailing lists