diff options
Diffstat (limited to 'drivers/pinctrl/sh-pfc')
-rw-r--r-- | drivers/pinctrl/sh-pfc/gpio.c | 6 | ||||
-rw-r--r-- | drivers/pinctrl/sh-pfc/pinctrl.c | 9 |
2 files changed, 6 insertions, 9 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); |
diff --git a/drivers/pinctrl/sh-pfc/pinctrl.c b/drivers/pinctrl/sh-pfc/pinctrl.c index 78bd277c01d9..a60c317d988a 100644 --- a/drivers/pinctrl/sh-pfc/pinctrl.c +++ b/drivers/pinctrl/sh-pfc/pinctrl.c | |||
@@ -28,7 +28,6 @@ | |||
28 | struct sh_pfc_pinctrl { | 28 | struct sh_pfc_pinctrl { |
29 | struct pinctrl_dev *pctl; | 29 | struct pinctrl_dev *pctl; |
30 | struct pinctrl_desc pctl_desc; | 30 | struct pinctrl_desc pctl_desc; |
31 | struct pinctrl_gpio_range range; | ||
32 | 31 | ||
33 | struct sh_pfc *pfc; | 32 | struct sh_pfc *pfc; |
34 | 33 | ||
@@ -377,14 +376,6 @@ int sh_pfc_register_pinctrl(struct sh_pfc *pfc) | |||
377 | if (IS_ERR(pmx->pctl)) | 376 | if (IS_ERR(pmx->pctl)) |
378 | return PTR_ERR(pmx->pctl); | 377 | return PTR_ERR(pmx->pctl); |
379 | 378 | ||
380 | pmx->range.name = DRV_NAME, | ||
381 | pmx->range.id = 0; | ||
382 | pmx->range.npins = pfc->info->nr_pins; | ||
383 | pmx->range.base = 0; | ||
384 | pmx->range.pin_base = 0; | ||
385 | |||
386 | pinctrl_add_gpio_range(pmx->pctl, &pmx->range); | ||
387 | |||
388 | return 0; | 379 | return 0; |
389 | } | 380 | } |
390 | 381 | ||