aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/rtc/rtc-ds1553.c8
-rw-r--r--drivers/rtc/rtc-ds1742.c8
-rw-r--r--drivers/rtc/rtc-stk17ta8.c8
3 files changed, 12 insertions, 12 deletions
diff --git a/drivers/rtc/rtc-ds1553.c b/drivers/rtc/rtc-ds1553.c
index dadd0f517d5a..ed1ef7c9cc06 100644
--- a/drivers/rtc/rtc-ds1553.c
+++ b/drivers/rtc/rtc-ds1553.c
@@ -255,8 +255,8 @@ static ssize_t ds1553_nvram_read(struct kobject *kobj,
255 struct bin_attribute *bin_attr, 255 struct bin_attribute *bin_attr,
256 char *buf, loff_t pos, size_t size) 256 char *buf, loff_t pos, size_t size)
257{ 257{
258 struct platform_device *pdev = 258 struct device *dev = container_of(kobj, struct device, kobj);
259 to_platform_device(container_of(kobj, struct device, kobj)); 259 struct platform_device *pdev = to_platform_device(dev);
260 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); 260 struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
261 void __iomem *ioaddr = pdata->ioaddr; 261 void __iomem *ioaddr = pdata->ioaddr;
262 ssize_t count; 262 ssize_t count;
@@ -270,8 +270,8 @@ static ssize_t ds1553_nvram_write(struct kobject *kobj,
270 struct bin_attribute *bin_attr, 270 struct bin_attribute *bin_attr,
271 char *buf, loff_t pos, size_t size) 271 char *buf, loff_t pos, size_t size)
272{ 272{
273 struct platform_device *pdev = 273 struct device *dev = container_of(kobj, struct device, kobj);
274 to_platform_device(container_of(kobj, struct device, kobj)); 274 struct platform_device *pdev = to_platform_device(dev);
275 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); 275 struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
276 void __iomem *ioaddr = pdata->ioaddr; 276 void __iomem *ioaddr = pdata->ioaddr;
277 ssize_t count; 277 ssize_t count;
diff --git a/drivers/rtc/rtc-ds1742.c b/drivers/rtc/rtc-ds1742.c
index 19d2f3333cf0..a1273360a44e 100644
--- a/drivers/rtc/rtc-ds1742.c
+++ b/drivers/rtc/rtc-ds1742.c
@@ -131,8 +131,8 @@ static ssize_t ds1742_nvram_read(struct kobject *kobj,
131 struct bin_attribute *bin_attr, 131 struct bin_attribute *bin_attr,
132 char *buf, loff_t pos, size_t size) 132 char *buf, loff_t pos, size_t size)
133{ 133{
134 struct platform_device *pdev = 134 struct device *dev = container_of(kobj, struct device, kobj);
135 to_platform_device(container_of(kobj, struct device, kobj)); 135 struct platform_device *pdev = to_platform_device(dev);
136 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); 136 struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
137 void __iomem *ioaddr = pdata->ioaddr_nvram; 137 void __iomem *ioaddr = pdata->ioaddr_nvram;
138 ssize_t count; 138 ssize_t count;
@@ -146,8 +146,8 @@ static ssize_t ds1742_nvram_write(struct kobject *kobj,
146 struct bin_attribute *bin_attr, 146 struct bin_attribute *bin_attr,
147 char *buf, loff_t pos, size_t size) 147 char *buf, loff_t pos, size_t size)
148{ 148{
149 struct platform_device *pdev = 149 struct device *dev = container_of(kobj, struct device, kobj);
150 to_platform_device(container_of(kobj, struct device, kobj)); 150 struct platform_device *pdev = to_platform_device(dev);
151 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); 151 struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
152 void __iomem *ioaddr = pdata->ioaddr_nvram; 152 void __iomem *ioaddr = pdata->ioaddr_nvram;
153 ssize_t count; 153 ssize_t count;
diff --git a/drivers/rtc/rtc-stk17ta8.c b/drivers/rtc/rtc-stk17ta8.c
index 31ea22070e3d..67700831b5c9 100644
--- a/drivers/rtc/rtc-stk17ta8.c
+++ b/drivers/rtc/rtc-stk17ta8.c
@@ -247,8 +247,8 @@ static ssize_t stk17ta8_nvram_read(struct kobject *kobj,
247 struct bin_attribute *attr, char *buf, 247 struct bin_attribute *attr, char *buf,
248 loff_t pos, size_t size) 248 loff_t pos, size_t size)
249{ 249{
250 struct platform_device *pdev = 250 struct device *dev = container_of(kobj, struct device, kobj);
251 to_platform_device(container_of(kobj, struct device, kobj)); 251 struct platform_device *pdev = to_platform_device(dev);
252 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); 252 struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
253 void __iomem *ioaddr = pdata->ioaddr; 253 void __iomem *ioaddr = pdata->ioaddr;
254 ssize_t count; 254 ssize_t count;
@@ -262,8 +262,8 @@ static ssize_t stk17ta8_nvram_write(struct kobject *kobj,
262 struct bin_attribute *attr, char *buf, 262 struct bin_attribute *attr, char *buf,
263 loff_t pos, size_t size) 263 loff_t pos, size_t size)
264{ 264{
265 struct platform_device *pdev = 265 struct device *dev = container_of(kobj, struct device, kobj);
266 to_platform_device(container_of(kobj, struct device, kobj)); 266 struct platform_device *pdev = to_platform_device(dev);
267 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); 267 struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
268 void __iomem *ioaddr = pdata->ioaddr; 268 void __iomem *ioaddr = pdata->ioaddr;
269 ssize_t count; 269 ssize_t count;