summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-sunxi.c
diff options
context:
space:
mode:
authorLABBE Corentin <clabbe.montjoie@gmail.com>2015-11-19 05:50:09 -0500
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2016-01-11 14:19:56 -0500
commit6ddab92faa2d7d7b38cb2b228f7fdfd1eecba5e2 (patch)
tree67438b4026600f87cf49b017992f0d304cea27c2 /drivers/rtc/rtc-sunxi.c
parentf8947feb2c0196dafa7683f557eb8dddfb1ae167 (diff)
rtc: sunxi: constify the data_year_param structure
The data_year_param struct is never modified, so lets constify it. This permit to remove cast since of_device_id is const also. Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc/rtc-sunxi.c')
-rw-r--r--drivers/rtc/rtc-sunxi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-sunxi.c b/drivers/rtc/rtc-sunxi.c
index b4f35acc1e12..0c08a5b7dc61 100644
--- a/drivers/rtc/rtc-sunxi.c
+++ b/drivers/rtc/rtc-sunxi.c
@@ -133,7 +133,7 @@ struct sunxi_rtc_data_year {
133 unsigned char leap_shift; /* bit shift to get the leap year */ 133 unsigned char leap_shift; /* bit shift to get the leap year */
134}; 134};
135 135
136static struct sunxi_rtc_data_year data_year_param[] = { 136static const struct sunxi_rtc_data_year data_year_param[] = {
137 [0] = { 137 [0] = {
138 .min = 2010, 138 .min = 2010,
139 .max = 2073, 139 .max = 2073,
@@ -151,7 +151,7 @@ static struct sunxi_rtc_data_year data_year_param[] = {
151struct sunxi_rtc_dev { 151struct sunxi_rtc_dev {
152 struct rtc_device *rtc; 152 struct rtc_device *rtc;
153 struct device *dev; 153 struct device *dev;
154 struct sunxi_rtc_data_year *data_year; 154 const struct sunxi_rtc_data_year *data_year;
155 void __iomem *base; 155 void __iomem *base;
156 int irq; 156 int irq;
157}; 157};
@@ -468,7 +468,7 @@ static int sunxi_rtc_probe(struct platform_device *pdev)
468 dev_err(&pdev->dev, "Unable to setup RTC data\n"); 468 dev_err(&pdev->dev, "Unable to setup RTC data\n");
469 return -ENODEV; 469 return -ENODEV;
470 } 470 }
471 chip->data_year = (struct sunxi_rtc_data_year *) of_id->data; 471 chip->data_year = of_id->data;
472 472
473 /* clear the alarm count value */ 473 /* clear the alarm count value */
474 writel(0, chip->base + SUNXI_ALRM_DHMS); 474 writel(0, chip->base + SUNXI_ALRM_DHMS);