diff options
author | Julia Lawall <julia.lawall@lip6.fr> | 2015-12-30 15:59:34 -0500 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2016-01-11 14:22:27 -0500 |
commit | c4c23f58a96dcce177c996511363b85bf114ae8f (patch) | |
tree | 2f250398e928ac0799e52eb9a77b824fa3a8c0a7 | |
parent | 8ae83b6f76fc74eb6535b9d331a3310a59c32f84 (diff) |
rtc: rtc-ds2404: constify ds2404_chip_ops structures
The ds2404_chip_ops structure is never modified, so declare it 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>
-rw-r--r-- | drivers/rtc/rtc-ds2404.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-ds2404.c b/drivers/rtc/rtc-ds2404.c index 7885edd3d507..16310fe79d76 100644 --- a/drivers/rtc/rtc-ds2404.c +++ b/drivers/rtc/rtc-ds2404.c | |||
@@ -48,7 +48,7 @@ struct ds2404_gpio { | |||
48 | 48 | ||
49 | struct ds2404 { | 49 | struct ds2404 { |
50 | struct ds2404_gpio *gpio; | 50 | struct ds2404_gpio *gpio; |
51 | struct ds2404_chip_ops *ops; | 51 | const struct ds2404_chip_ops *ops; |
52 | struct rtc_device *rtc; | 52 | struct rtc_device *rtc; |
53 | }; | 53 | }; |
54 | 54 | ||
@@ -95,7 +95,7 @@ static void ds2404_gpio_unmap(struct ds2404 *chip) | |||
95 | gpio_free(ds2404_gpio[i].gpio); | 95 | gpio_free(ds2404_gpio[i].gpio); |
96 | } | 96 | } |
97 | 97 | ||
98 | static struct ds2404_chip_ops ds2404_gpio_ops = { | 98 | static const struct ds2404_chip_ops ds2404_gpio_ops = { |
99 | .map_io = ds2404_gpio_map, | 99 | .map_io = ds2404_gpio_map, |
100 | .unmap_io = ds2404_gpio_unmap, | 100 | .unmap_io = ds2404_gpio_unmap, |
101 | }; | 101 | }; |