Commit 6d5bddd5 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Linus Walleij

pinctrl: sh-pfc: Constify IRQ GPIOs arrays

The arrays are never modified, make them const.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 9aecff58
......@@ -207,7 +207,7 @@ static int gpio_pin_to_irq(struct gpio_chip *gc, unsigned offset)
unsigned int i, k;
for (i = 0; i < pfc->info->gpio_irq_size; i++) {
short *gpios = pfc->info->gpio_irq[i].gpios;
const short *gpios = pfc->info->gpio_irq[i].gpios;
for (k = 0; gpios[k] >= 0; k++) {
if (gpios[k] == offset)
......
......@@ -95,11 +95,11 @@ struct pinmux_data_reg {
struct pinmux_irq {
int irq;
short *gpios;
const short *gpios;
};
#define PINMUX_IRQ(irq_nr, ids...) \
{ .irq = irq_nr, .gpios = (short []) { ids, -1 } }
{ .irq = irq_nr, .gpios = (const short []) { ids, -1 } }
struct pinmux_range {
u16 begin;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment