提交 c4c23f58 编写于 作者: J Julia Lawall 提交者: Alexandre Belloni

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: NJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
上级 8ae83b6f
...@@ -48,7 +48,7 @@ struct ds2404_gpio { ...@@ -48,7 +48,7 @@ struct ds2404_gpio {
struct ds2404 { struct ds2404 {
struct ds2404_gpio *gpio; struct ds2404_gpio *gpio;
struct ds2404_chip_ops *ops; const struct ds2404_chip_ops *ops;
struct rtc_device *rtc; struct rtc_device *rtc;
}; };
...@@ -95,7 +95,7 @@ static void ds2404_gpio_unmap(struct ds2404 *chip) ...@@ -95,7 +95,7 @@ static void ds2404_gpio_unmap(struct ds2404 *chip)
gpio_free(ds2404_gpio[i].gpio); gpio_free(ds2404_gpio[i].gpio);
} }
static struct ds2404_chip_ops ds2404_gpio_ops = { static const struct ds2404_chip_ops ds2404_gpio_ops = {
.map_io = ds2404_gpio_map, .map_io = ds2404_gpio_map,
.unmap_io = ds2404_gpio_unmap, .unmap_io = ds2404_gpio_unmap,
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册