]> git.baikalelectronics.ru Git - kernel.git/commit
amd-xgbe: Use platform_irq_count()
authorJean-Philippe Brucker <jean-philippe@linaro.org>
Thu, 9 Jun 2022 16:14:59 +0000 (17:14 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 14 Jun 2022 06:12:39 +0000 (23:12 -0700)
commitafa4349f586791b93de5f11c1a48b79cf3bcc723
tree1d64c3e8f1988489d17393c9ff244892589b0e22
parent10c127f6fcb95e058ac90122cfce0e1270b287af
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
55098b87fc23 ("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: 55098b87fc23 ("of/platform: Drop static setup of IRQ resource from DT core")
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://lore.kernel.org/r/20220609161457.69614-1-jean-philippe@linaro.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/amd/xgbe/xgbe-platform.c