Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1303219
| From | Bjorn Andersson <bjorn@kryo.se> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/3] pinctrl: qcom: Use platform_irq_count() instead of of_irq_count() |
| Date | 2016-01-07 02:20 +0100 |
| Message-ID | <qO7p7-KS-11@gated-at.bofh.it> (permalink) |
| References | <qO7p7-KS-3@gated-at.bofh.it> <qO7p7-KS-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Jan 6, 2016 at 5:12 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> 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.
>
[..]
> diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c b/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
> index 3ddb4cc38f1c..37ae6b72ea35 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 = of_irq_count(pdev->dev.of_node);
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) {
Regards,
Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 2/3] pinctrl: qcom: Use platform_irq_count() instead of of_irq_count() Stephen Boyd <sboyd@codeaurora.org> - 2016-01-07 02:20 +0100
Re: [PATCH 2/3] pinctrl: qcom: Use platform_irq_count() instead of of_irq_count() Bjorn Andersson <bjorn@kryo.se> - 2016-01-07 02:20 +0100
Re: [PATCH 2/3] pinctrl: qcom: Use platform_irq_count() instead of of_irq_count() Stephen Boyd <sboyd@codeaurora.org> - 2016-01-07 02:30 +0100
[PATCH v2 2/3] pinctrl: qcom: Use platform_irq_count() instead of of_irq_count() Stephen Boyd <sboyd@codeaurora.org> - 2016-01-07 02:40 +0100
Re: [PATCH v2 2/3] pinctrl: qcom: Use platform_irq_count() instead of of_irq_count() Linus Walleij <linus.walleij@linaro.org> - 2016-01-07 10:40 +0100
csiph-web