[PATCH V2 4/5] pinctrl: SPEAr: Add gpio ranges support

Viresh Kumar viresh.kumar at st.com
Fri May 4 01:51:42 EDT 2012


On 5/3/2012 3:42 PM, Viresh KUMAR wrote:
> +static int gpio_request_endisable(struct pinctrl_dev *pctldev,
> +               struct pinctrl_gpio_range *range, unsigned offset, bool enable)
> +{
> +       struct spear_pmx *pmx = pinctrl_dev_get_drvdata(pctldev);
> +       struct spear_gpio_pingroup *gpio_pingroup;
> +
> +       gpio_pingroup = get_gpio_pingroup(pmx, offset);
> +       if (PTR_ERR(gpio_pingroup))
> +               return PTR_ERR(gpio_pingroup);
> +

Minor fixup:

---
 drivers/pinctrl/spear/pinctrl-spear.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/pinctrl/spear/pinctrl-spear.c b/drivers/pinctrl/spear/pinctrl-spear.c
index 2596fa6..c0c3b28 100644
--- a/drivers/pinctrl/spear/pinctrl-spear.c
+++ b/drivers/pinctrl/spear/pinctrl-spear.c
@@ -316,7 +316,7 @@ static int gpio_request_endisable(struct pinctrl_dev *pctldev,
        struct spear_gpio_pingroup *gpio_pingroup;
 
        gpio_pingroup = get_gpio_pingroup(pmx, offset);
-       if (PTR_ERR(gpio_pingroup))
+       if (IS_ERR(gpio_pingroup))
                return PTR_ERR(gpio_pingroup);
 
        if (gpio_pingroup) {

-- 
viresh



More information about the linux-arm-kernel mailing list