Skip to content
Commit 884c65e4 authored by Jean-Philippe Brucker's avatar Jean-Philippe Brucker Committed by Jakub Kicinski
Browse files

amd-xgbe: Use platform_irq_count()



The AMD XGbE driver currently counts the number of interrupts assigned
to the device by inspecting the pdev->resource array. Since commit
a1a2b712 ("of/platform: Drop static setup of IRQ resource from DT
core") removed IRQs from this array, the driver now attempts to get all
interrupts from 1 to -1U and gives up probing once it reaches an invalid
interrupt index.

Obtain the number of IRQs with platform_irq_count() instead.

Fixes: a1a2b712 ("of/platform: Drop static setup of IRQ resource from DT core")
Signed-off-by: default avatarJean-Philippe Brucker <jean-philippe@linaro.org>
Acked-by: default avatarRob Herring <robh@kernel.org>
Acked-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
Link: https://lore.kernel.org/r/20220609161457.69614-1-jean-philippe@linaro.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 619c010a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment