Skip to content

Commit

Permalink
pinctrl: sh-pfc: Constify IRQ GPIOs arrays
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Laurent Pinchart authored and Linus Walleij committed Dec 20, 2013
1 parent 9aecff5 commit 6d5bddd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/pinctrl/sh-pfc/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions drivers/pinctrl/sh-pfc/sh_pfc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6d5bddd

Please sign in to comment.