diff --git a/drivers/pinctrl/sh-pfc/core.h b/drivers/pinctrl/sh-pfc/core.h index f02ba1dde3a0..93963a19b340 100644 --- a/drivers/pinctrl/sh-pfc/core.h +++ b/drivers/pinctrl/sh-pfc/core.h @@ -34,7 +34,7 @@ struct sh_pfc { unsigned int num_windows; struct sh_pfc_window *window; - unsigned int nr_pins; + unsigned int nr_gpio_pins; struct sh_pfc_chip *gpio; struct sh_pfc_chip *func; diff --git a/drivers/pinctrl/sh-pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c index 87ae38b97a38..7661be5054a0 100644 --- a/drivers/pinctrl/sh-pfc/gpio.c +++ b/drivers/pinctrl/sh-pfc/gpio.c @@ -245,7 +245,7 @@ static int gpio_pin_setup(struct sh_pfc_chip *chip) gc->dev = pfc->dev; gc->owner = THIS_MODULE; gc->base = 0; - gc->ngpio = pfc->nr_pins; + gc->ngpio = pfc->nr_gpio_pins; return 0; } @@ -293,7 +293,7 @@ static int gpio_function_setup(struct sh_pfc_chip *chip) gc->label = pfc->info->name; gc->owner = THIS_MODULE; - gc->base = pfc->nr_pins; + gc->base = pfc->nr_gpio_pins; gc->ngpio = pfc->info->nr_func_gpios; return 0; diff --git a/drivers/pinctrl/sh-pfc/pinctrl.c b/drivers/pinctrl/sh-pfc/pinctrl.c index bc8b028bb5d2..314255d79bff 100644 --- a/drivers/pinctrl/sh-pfc/pinctrl.c +++ b/drivers/pinctrl/sh-pfc/pinctrl.c @@ -632,7 +632,7 @@ static int sh_pfc_map_pins(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx) } } - pfc->nr_pins = ranges[nr_ranges-1].end + 1; + pfc->nr_gpio_pins = ranges[nr_ranges-1].end + 1; return nr_ranges; }