diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2016-01-07 02:37:41 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-01-07 10:35:52 +0100 |
commit | a5ea13f025e7bf3bb280a22f5fe63b7159358932 (patch) | |
tree | edfd504d4b5f402c05d4a214b409edc68175b8b4 /drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | |
parent | driver-core: platform: Add platform_irq_count() (diff) | |
download | linux-a5ea13f025e7bf3bb280a22f5fe63b7159358932.tar.xz linux-a5ea13f025e7bf3bb280a22f5fe63b7159358932.zip |
pinctrl: qcom: Use platform_irq_count() instead of of_irq_count()
of_irq_count() is not an exported symbol (and it shouldn't be
used by platform drivers anyway) so use platform_irq_count()
instead. This allows us to make the qcom pinctrl drivers modular
again.
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Andy Gross <andy.gross@linaro.org>
Cc: Bjorn Andersson <bjorn@kryo.se>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/qcom/pinctrl-spmi-mpp.c')
-rw-r--r-- | drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c index 8841bb75fc9b..2df4f29175ae 100644 --- a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c +++ b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c @@ -804,9 +804,11 @@ static int pmic_mpp_probe(struct platform_device *pdev) return ret; } - npins = of_irq_count(dev->of_node); + npins = platform_irq_count(pdev); if (!npins) return -EINVAL; + if (npins < 0) + return npins; BUG_ON(npins > ARRAY_SIZE(pmic_mpp_groups)); |