From 6d5bddd5258c11f58cc6a6d17cd97ce5ad39a270 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 16 Dec 2013 20:25:15 +0100 Subject: pinctrl: sh-pfc: Constify IRQ GPIOs arrays The arrays are never modified, make them const. Signed-off-by: Laurent Pinchart Signed-off-by: Linus Walleij --- drivers/pinctrl/sh-pfc/gpio.c | 2 +- drivers/pinctrl/sh-pfc/sh_pfc.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/pinctrl') diff --git a/drivers/pinctrl/sh-pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c index 63480815e1a..a9288ab01f7 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) 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) diff --git a/drivers/pinctrl/sh-pfc/sh_pfc.h b/drivers/pinctrl/sh-pfc/sh_pfc.h index cdd033851c2..25496c416de 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 { 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; -- cgit v1.2.3-70-g09d2