Commit 7432a850 authored by Julia Lawall's avatar Julia Lawall Committed by Alexandre Belloni

rtc: v3020: constify v3020_chip_ops structures

The v3020_chip_ops structures are never modified, so declare them as const.

Done with the help of Coccinelle.
Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent 78ef5f2d
...@@ -57,7 +57,7 @@ struct v3020 { ...@@ -57,7 +57,7 @@ struct v3020 {
/* GPIO access */ /* GPIO access */
struct gpio *gpio; struct gpio *gpio;
struct v3020_chip_ops *ops; const struct v3020_chip_ops *ops;
struct rtc_device *rtc; struct rtc_device *rtc;
}; };
...@@ -95,7 +95,7 @@ static unsigned char v3020_mmio_read_bit(struct v3020 *chip) ...@@ -95,7 +95,7 @@ static unsigned char v3020_mmio_read_bit(struct v3020 *chip)
return !!(readl(chip->ioaddress) & (1 << chip->leftshift)); return !!(readl(chip->ioaddress) & (1 << chip->leftshift));
} }
static struct v3020_chip_ops v3020_mmio_ops = { static const struct v3020_chip_ops v3020_mmio_ops = {
.map_io = v3020_mmio_map, .map_io = v3020_mmio_map,
.unmap_io = v3020_mmio_unmap, .unmap_io = v3020_mmio_unmap,
.read_bit = v3020_mmio_read_bit, .read_bit = v3020_mmio_read_bit,
...@@ -158,7 +158,7 @@ static unsigned char v3020_gpio_read_bit(struct v3020 *chip) ...@@ -158,7 +158,7 @@ static unsigned char v3020_gpio_read_bit(struct v3020 *chip)
return bit; return bit;
} }
static struct v3020_chip_ops v3020_gpio_ops = { static const struct v3020_chip_ops v3020_gpio_ops = {
.map_io = v3020_gpio_map, .map_io = v3020_gpio_map,
.unmap_io = v3020_gpio_unmap, .unmap_io = v3020_gpio_unmap,
.read_bit = v3020_gpio_read_bit, .read_bit = v3020_gpio_read_bit,
......
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