diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-03-07 18:45:12 -0500 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-03-15 08:33:39 -0400 |
commit | 247127f90ba1fcc234008e00e937537a89eef9ca (patch) | |
tree | c187df2d4d479f1a56f5c4d8b07b96b22f444200 /drivers/pinctrl/sh-pfc/gpio.c | |
parent | 934cb02bab9003bf65afe73e9146a1ea63b26c40 (diff) |
sh-pfc: Replace pinctrl_add_gpio_range() with gpiochip_add_pin_range()
Adding a GPIO range to a pinctrl device logically belongs to the GPIO
driver. Switch to the right API.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/sh-pfc/gpio.c')
-rw-r--r-- | drivers/pinctrl/sh-pfc/gpio.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/pinctrl/sh-pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c index 45090d8381a2..32a9c7870a16 100644 --- a/drivers/pinctrl/sh-pfc/gpio.c +++ b/drivers/pinctrl/sh-pfc/gpio.c | |||
@@ -220,6 +220,7 @@ sh_pfc_add_gpiochip(struct sh_pfc *pfc, void(*setup)(struct sh_pfc_chip *)) | |||
220 | int sh_pfc_register_gpiochip(struct sh_pfc *pfc) | 220 | int sh_pfc_register_gpiochip(struct sh_pfc *pfc) |
221 | { | 221 | { |
222 | struct sh_pfc_chip *chip; | 222 | struct sh_pfc_chip *chip; |
223 | int ret; | ||
223 | 224 | ||
224 | chip = sh_pfc_add_gpiochip(pfc, gpio_pin_setup); | 225 | chip = sh_pfc_add_gpiochip(pfc, gpio_pin_setup); |
225 | if (IS_ERR(chip)) | 226 | if (IS_ERR(chip)) |
@@ -227,6 +228,11 @@ int sh_pfc_register_gpiochip(struct sh_pfc *pfc) | |||
227 | 228 | ||
228 | pfc->gpio = chip; | 229 | pfc->gpio = chip; |
229 | 230 | ||
231 | ret = gpiochip_add_pin_range(&chip->gpio_chip, dev_name(pfc->dev), 0, 0, | ||
232 | chip->gpio_chip.ngpio); | ||
233 | if (ret < 0) | ||
234 | return ret; | ||
235 | |||
230 | chip = sh_pfc_add_gpiochip(pfc, gpio_function_setup); | 236 | chip = sh_pfc_add_gpiochip(pfc, gpio_function_setup); |
231 | if (IS_ERR(chip)) | 237 | if (IS_ERR(chip)) |
232 | return PTR_ERR(chip); | 238 | return PTR_ERR(chip); |