pinctrl: sh-pfc: Do not use platform_get_irq() to count interrupts
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 16 Oct 2019 14:26:01 +0000 (16:26 +0200)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 1 Nov 2019 12:42:51 +0000 (13:42 +0100)
commitad7fe1a1a35994a201497443b5140bf54b074cca
treef3a402635d4c3e2c7cb31a919926b2cdca85e57e
parentf846d1e704f2d07a7f359f65eac2c8cac565db35
pinctrl: sh-pfc: Do not use platform_get_irq() to count interrupts

As platform_get_irq() now prints an error when the interrupt does not
exist, counting interrupts by looping until failure causes the printing
of scary messages like:

    sh-pfc e6060000.pin-controller: IRQ index 0 not found

Fix this by using the platform_irq_count() helper instead.

Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20191016142601.28255-1-geert+renesas@glider.be
drivers/pinctrl/sh-pfc/core.c