Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1303215 > unrolled thread
| Started by | Stephen Boyd <sboyd@codeaurora.org> |
|---|---|
| First post | 2016-01-07 02:20 +0100 |
| Last post | 2016-01-07 10:40 +0100 |
| Articles | 5 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[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
| From | Stephen Boyd <sboyd@codeaurora.org> |
|---|---|
| Date | 2016-01-07 02:20 +0100 |
| Subject | [PATCH 2/3] pinctrl: qcom: Use platform_irq_count() instead of of_irq_count() |
| Message-ID | <qO7p7-KS-1@gated-at.bofh.it> |
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>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 4 +++-
drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 4 +++-
drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c | 9 ++++++---
drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c | 9 ++++++---
4 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
index 60b922274879..9ed2b4eba1f8 100644
--- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
+++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
@@ -702,9 +702,11 @@ static int pmic_gpio_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_gpio_groups));
diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
index 5654287c382c..3fd04a6888a4 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));
diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
index df054e716dc0..bde2aa684dc1 100644
--- a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
+++ b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
@@ -667,16 +667,19 @@ static int pm8xxx_gpio_probe(struct platform_device *pdev)
struct pinctrl_pin_desc *pins;
struct pm8xxx_gpio *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) {
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);
+ if (!npins)
return -EINVAL;
+ if (npins < 0)
+ return npins;
+ pctrl->npins = npins;
pctrl->regmap = dev_get_regmap(pdev->dev.parent, NULL);
if (!pctrl->regmap) {
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
--
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/
[toc] | [next] | [standalone]
| From | Bjorn Andersson <bjorn@kryo.se> |
|---|---|
| Date | 2016-01-07 02:20 +0100 |
| Message-ID | <qO7p7-KS-11@gated-at.bofh.it> |
| In reply to | #1303215 |
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/
[toc] | [prev] | [next] | [standalone]
| From | Stephen Boyd <sboyd@codeaurora.org> |
|---|---|
| Date | 2016-01-07 02:30 +0100 |
| Subject | Re: [PATCH 2/3] pinctrl: qcom: Use platform_irq_count() instead of of_irq_count() |
| Message-ID | <qO7yO-Q9-15@gated-at.bofh.it> |
| In reply to | #1303219 |
On 01/06/16 17:19, Bjorn Andersson wrote: > 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) Ouch. So many duplicates the odds were against me. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -- 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/
[toc] | [prev] | [next] | [standalone]
| From | Stephen Boyd <sboyd@codeaurora.org> |
|---|---|
| Date | 2016-01-07 02:40 +0100 |
| Subject | [PATCH v2 2/3] pinctrl: qcom: Use platform_irq_count() instead of of_irq_count() |
| Message-ID | <qO7It-TT-1@gated-at.bofh.it> |
| In reply to | #1303219 |
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>
---
Changes from v1:
* Fixed one wrong of_irq_count() noticed by Bjorn
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 4 +++-
drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 4 +++-
drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c | 9 ++++++---
drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c | 9 ++++++---
4 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
index f46dbbf7ff25..4e12ded3c773 100644
--- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
+++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
@@ -697,9 +697,11 @@ static int pmic_gpio_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_gpio_groups));
diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
index 5c7935012e3a..2f18323571a6 100644
--- a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
+++ b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
@@ -799,9 +799,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));
diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
index f75e482073b7..cd8580d9741d 100644
--- a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
+++ b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
@@ -667,16 +667,19 @@ static int pm8xxx_gpio_probe(struct platform_device *pdev)
struct pinctrl_pin_desc *pins;
struct pm8xxx_gpio *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) {
diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c b/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
index 3e19c12a315a..54a5402a9079 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) {
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
--
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/
[toc] | [prev] | [next] | [standalone]
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Date | 2016-01-07 10:40 +0100 |
| Subject | Re: [PATCH v2 2/3] pinctrl: qcom: Use platform_irq_count() instead of of_irq_count() |
| Message-ID | <qOfd0-6ef-23@gated-at.bofh.it> |
| In reply to | #1303227 |
On Thu, Jan 7, 2016 at 2:37 AM, 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. > > 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> > --- > > Changes from v1: > * Fixed one wrong of_irq_count() noticed by Bjorn This v2 patch applied. Yours, Linus Walleij -- 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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web