aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/sh-pfc/gpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pinctrl/sh-pfc/gpio.c')
-rw-r--r--drivers/pinctrl/sh-pfc/gpio.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/pinctrl/sh-pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c
index 3620bd84ae93..87ae38b97a38 100644
--- a/drivers/pinctrl/sh-pfc/gpio.c
+++ b/drivers/pinctrl/sh-pfc/gpio.c
@@ -48,11 +48,11 @@ static struct sh_pfc *gpio_to_pfc(struct gpio_chip *gc)
48 return gpio_to_pfc_chip(gc)->pfc; 48 return gpio_to_pfc_chip(gc)->pfc;
49} 49}
50 50
51static void gpio_get_data_reg(struct sh_pfc_chip *chip, unsigned int gpio, 51static void gpio_get_data_reg(struct sh_pfc_chip *chip, unsigned int offset,
52 struct sh_pfc_gpio_data_reg **reg, 52 struct sh_pfc_gpio_data_reg **reg,
53 unsigned int *bit) 53 unsigned int *bit)
54{ 54{
55 int idx = sh_pfc_get_pin_index(chip->pfc, gpio); 55 int idx = sh_pfc_get_pin_index(chip->pfc, offset);
56 struct sh_pfc_gpio_pin *gpio_pin = &chip->pins[idx]; 56 struct sh_pfc_gpio_pin *gpio_pin = &chip->pins[idx];
57 57
58 *reg = &chip->regs[gpio_pin->dreg]; 58 *reg = &chip->regs[gpio_pin->dreg];
@@ -76,11 +76,11 @@ static void gpio_write_data_reg(struct sh_pfc_chip *chip,
76 sh_pfc_write_raw_reg(mem, dreg->reg_width, value); 76 sh_pfc_write_raw_reg(mem, dreg->reg_width, value);
77} 77}
78 78
79static void gpio_setup_data_reg(struct sh_pfc_chip *chip, unsigned gpio) 79static void gpio_setup_data_reg(struct sh_pfc_chip *chip, unsigned idx)
80{ 80{
81 struct sh_pfc *pfc = chip->pfc; 81 struct sh_pfc *pfc = chip->pfc;
82 struct sh_pfc_gpio_pin *gpio_pin = &chip->pins[gpio]; 82 struct sh_pfc_gpio_pin *gpio_pin = &chip->pins[idx];
83 const struct sh_pfc_pin *pin = &pfc->info->pins[gpio]; 83 const struct sh_pfc_pin *pin = &pfc->info->pins[idx];
84 const struct pinmux_data_reg *dreg; 84 const struct pinmux_data_reg *dreg;
85 unsigned int bit; 85 unsigned int bit;
86 unsigned int i; 86 unsigned int i;