diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-12-16 14:25:15 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-12-20 06:26:54 -0500 |
commit | 6d5bddd5258c11f58cc6a6d17cd97ce5ad39a270 (patch) | |
tree | 3a7cb2e0aec15c4feab97b122d4689fc39b0c866 /drivers/pinctrl | |
parent | 9aecff583e64a15b1f8f7fa739abb4a8701f7c67 (diff) |
pinctrl: sh-pfc: Constify IRQ GPIOs arrays
The arrays are never modified, make them const.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/sh-pfc/gpio.c | 2 | ||||
-rw-r--r-- | drivers/pinctrl/sh-pfc/sh_pfc.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pinctrl/sh-pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c index 63480815e1af..a9288ab01f7b 100644 --- a/drivers/pinctrl/sh-pfc/gpio.c +++ b/drivers/pinctrl/sh-pfc/gpio.c | |||
@@ -207,7 +207,7 @@ static int gpio_pin_to_irq(struct gpio_chip *gc, unsigned offset) | |||
207 | unsigned int i, k; | 207 | unsigned int i, k; |
208 | 208 | ||
209 | for (i = 0; i < pfc->info->gpio_irq_size; i++) { | 209 | for (i = 0; i < pfc->info->gpio_irq_size; i++) { |
210 | short *gpios = pfc->info->gpio_irq[i].gpios; | 210 | const short *gpios = pfc->info->gpio_irq[i].gpios; |
211 | 211 | ||
212 | for (k = 0; gpios[k] >= 0; k++) { | 212 | for (k = 0; gpios[k] >= 0; k++) { |
213 | if (gpios[k] == offset) | 213 | if (gpios[k] == offset) |
diff --git a/drivers/pinctrl/sh-pfc/sh_pfc.h b/drivers/pinctrl/sh-pfc/sh_pfc.h index cdd033851c21..25496c416de0 100644 --- a/drivers/pinctrl/sh-pfc/sh_pfc.h +++ b/drivers/pinctrl/sh-pfc/sh_pfc.h | |||
@@ -95,11 +95,11 @@ struct pinmux_data_reg { | |||
95 | 95 | ||
96 | struct pinmux_irq { | 96 | struct pinmux_irq { |
97 | int irq; | 97 | int irq; |
98 | short *gpios; | 98 | const short *gpios; |
99 | }; | 99 | }; |
100 | 100 | ||
101 | #define PINMUX_IRQ(irq_nr, ids...) \ | 101 | #define PINMUX_IRQ(irq_nr, ids...) \ |
102 | { .irq = irq_nr, .gpios = (short []) { ids, -1 } } | 102 | { .irq = irq_nr, .gpios = (const short []) { ids, -1 } } |
103 | 103 | ||
104 | struct pinmux_range { | 104 | struct pinmux_range { |
105 | u16 begin; | 105 | u16 begin; |