| From 05219fc0af04f8f2874eaa3f1343230a4b9c27aa Mon Sep 17 00:00:00 2001 |
| From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> |
| Date: Mon, 15 Jul 2013 13:48:56 +0200 |
| Subject: sh-pfc: Rename struct sh_pfc nr_pins field to nr_gpio_pins |
| |
| The field contains the number of pins with an associated GPIO port. This |
| is currently equal to the total number of pins but will be modified when |
| adding support for pins without a GPIO port. Rename the field |
| accordingly. |
| |
| Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> |
| Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com> |
| (cherry picked from commit 28818fa5dadfd458fa7e17c8be26b2d7edffa8bf) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| --- |
| drivers/pinctrl/sh-pfc/core.h | 2 +- |
| drivers/pinctrl/sh-pfc/gpio.c | 4 ++-- |
| drivers/pinctrl/sh-pfc/pinctrl.c | 2 +- |
| 3 files changed, 4 insertions(+), 4 deletions(-) |
| |
| diff --git a/drivers/pinctrl/sh-pfc/core.h b/drivers/pinctrl/sh-pfc/core.h |
| index f02ba1dd..93963a19 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 87ae38b9..7661be50 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 bc8b028b..314255d7 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; |
| } |
| -- |
| 1.8.4.3.gca3854a |
| |