summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-v3020.c
diff options
context:
space:
mode:
authorJulia Lawall <julia.lawall@lip6.fr>2015-12-11 18:50:50 +0100
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2016-01-11 20:20:00 +0100
commit7432a850b5139b24b9288416a2ae796e4da295d6 (patch)
tree1e99389429d0a62c233be785fab2d36be5f9d57f /drivers/rtc/rtc-v3020.c
parent78ef5f2d2d8c9234d80b4e01e8b736e7241cd5ce (diff)
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: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc/rtc-v3020.c')
-rw-r--r--drivers/rtc/rtc-v3020.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-v3020.c b/drivers/rtc/rtc-v3020.c
index f9f97098c254..7a0436329d6c 100644
--- a/drivers/rtc/rtc-v3020.c
+++ b/drivers/rtc/rtc-v3020.c
@@ -57,7 +57,7 @@ struct v3020 {
/* GPIO access */
struct gpio *gpio;
- struct v3020_chip_ops *ops;
+ const struct v3020_chip_ops *ops;
struct rtc_device *rtc;
};
@@ -95,7 +95,7 @@ static unsigned char v3020_mmio_read_bit(struct v3020 *chip)
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,
.unmap_io = v3020_mmio_unmap,
.read_bit = v3020_mmio_read_bit,
@@ -158,7 +158,7 @@ static unsigned char v3020_gpio_read_bit(struct v3020 *chip)
return bit;
}
-static struct v3020_chip_ops v3020_gpio_ops = {
+static const struct v3020_chip_ops v3020_gpio_ops = {
.map_io = v3020_gpio_map,
.unmap_io = v3020_gpio_unmap,
.read_bit = v3020_gpio_read_bit,