Skip to content

Commit

Permalink
gpio: Constify irq_domain_ops
Browse files Browse the repository at this point in the history
The irq_domain_ops are not modified by the driver and the irqdomain core
code accepts pointer to a const data.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Krzysztof Kozlowski authored and Linus Walleij committed May 6, 2015
1 parent e5b6095 commit 0b354dc
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-bcm-kona.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ static void bcm_kona_gpio_irq_unmap(struct irq_domain *d, unsigned int irq)
irq_set_chip_data(irq, NULL);
}

static struct irq_domain_ops bcm_kona_irq_ops = {
static const struct irq_domain_ops bcm_kona_irq_ops = {
.map = bcm_kona_gpio_irq_map,
.unmap = bcm_kona_gpio_irq_unmap,
.xlate = irq_domain_xlate_twocell,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-em.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ static int em_gio_irq_domain_map(struct irq_domain *h, unsigned int irq,
return 0;
}

static struct irq_domain_ops em_gio_irq_domain_ops = {
static const struct irq_domain_ops em_gio_irq_domain_ops = {
.map = em_gio_irq_domain_map,
.xlate = irq_domain_xlate_twocell,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-grgpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ static void grgpio_irq_unmap(struct irq_domain *d, unsigned int irq)
spin_unlock_irqrestore(&priv->bgc.lock, flags);
}

static struct irq_domain_ops grgpio_irq_domain_ops = {
static const struct irq_domain_ops grgpio_irq_domain_ops = {
.map = grgpio_irq_map,
.unmap = grgpio_irq_unmap,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-mpc8xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ static int mpc8xxx_gpio_irq_map(struct irq_domain *h, unsigned int irq,
return 0;
}

static struct irq_domain_ops mpc8xxx_gpio_irq_ops = {
static const struct irq_domain_ops mpc8xxx_gpio_irq_ops = {
.map = mpc8xxx_gpio_irq_map,
.xlate = irq_domain_xlate_twocell,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-sa1100.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ static int sa1100_gpio_irqdomain_map(struct irq_domain *d,
return 0;
}

static struct irq_domain_ops sa1100_gpio_irqdomain_ops = {
static const struct irq_domain_ops sa1100_gpio_irqdomain_ops = {
.map = sa1100_gpio_irqdomain_map,
.xlate = irq_domain_xlate_onetwocell,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-sodaville.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static int sdv_xlate(struct irq_domain *h, struct device_node *node,
return 0;
}

static struct irq_domain_ops irq_domain_sdv_ops = {
static const struct irq_domain_ops irq_domain_sdv_ops = {
.xlate = sdv_xlate,
};

Expand Down

0 comments on commit 0b354dc

Please sign in to comment.