summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2016-01-06 17:37:41 -0800
committerFenglin Wu <fenglinw@codeaurora.org>2016-08-30 15:01:18 +0800
commitd1402bbe5f38ec3b52ed108198e82f59eb3e6c4b (patch)
tree7b160d9f567492dcacc269746314ef32b72c8ff2 /drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
parent11f95b1a64f06c97ea053b9582c738eac3703c9a (diff)
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. Change-Id: Ia2d8a0fc303af5ce6d34703f63bc61dfa0e5d148 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> Git-commit: a5ea13f025e7bf3bb280a22f5fe63b7159358932 Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
Diffstat (limited to 'drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c')
-rw-r--r--drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c b/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
index 0831063da54c..e9f01de51e18 100644
--- a/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
+++ b/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
@@ -758,16 +758,19 @@ static int pm8xxx_mpp_probe(struct platform_device *pdev)
struct pinctrl_pin_desc *pins;
struct pm8xxx_mpp *pctrl;
int ret;
- int i;
+ int i, npins;
pctrl = devm_kzalloc(&pdev->dev, sizeof(*pctrl), GFP_KERNEL);
if (!pctrl)
return -ENOMEM;
pctrl->dev = &pdev->dev;
- pctrl->npins = of_irq_count(pdev->dev.of_node);
- if (!pctrl->npins)
+ npins = platform_irq_count(pdev);
+ if (!npins)
return -EINVAL;
+ if (npins < 0)
+ return npins;
+ pctrl->npins = npins;
pctrl->regmap = dev_get_regmap(pdev->dev.parent, NULL);
if (!pctrl->regmap) {