iommu/rockchip: Don't use platform_get_irq to implicitly count irqs
authorHeiko Stuebner <heiko@sntech.de>
Wed, 25 Sep 2019 18:43:46 +0000 (20:43 +0200)
committerJoerg Roedel <jroedel@suse.de>
Tue, 15 Oct 2019 10:45:16 +0000 (12:45 +0200)
commitf9258156c73c2b2aa96731cd78bc23c4c4aac83d
treee4452e62c0aa77e23d65b44859e91dd7f6c2d231
parenta52e197d9527e18385df2e0f6f65e0bdc0e59829
iommu/rockchip: Don't use platform_get_irq to implicitly count irqs

Till now the Rockchip iommu driver walked through the irq list via
platform_get_irq() until it encountered an ENXIO error. With the
recent change to add a central error message, this always results
in such an error for each iommu on probe and shutdown.

To not confuse people, switch to platform_count_irqs() to get the
actual number of interrupts before walking through them.

Fixes: 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/rockchip-iommu.c