On 21/05/2025 22:43, Rosen Penev wrote: >>> - 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 +97,9 @@ 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); >>> + match = of_match_device(ath9k_of_match_table, &pdev->dev); >> >> There is a wrapper for getting data, use it. > I assume you mean of_device_get_match_data. Will do. >> >>> + dev_id = (uintptr_t)match->data; >> >> And dev_id is enum? Then you want kernel_ulong_t. > The entries specified in data are macros in the form of 0xYYYY. This > is why I used u16. The ath9k_init_device takes an int here. You did not use u16, but uintptr_t. My comment was about the cast. Best regards, Krzysztof