aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-ds1742.c
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2009-12-15 19:46:04 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 10:19:59 -0500
commit50e49bee3fc5c0cd0aff80ebd8061f356b7b9bd8 (patch)
treed5326488fb1f09251f9bfdca682d6c02993725b4 /drivers/rtc/rtc-ds1742.c
parent3151520d88b27b9dd4fb1c1f89a94807f0ad7ef1 (diff)
rtc: do not use container_of macro as an argument for to_platform_device
The to_platform_device macro itself uses container_of macro. Nested use of container_of macro causes following sparse warnings: rtc-ds1553.c:259:3: warning: symbol '__mptr' shadows an earlier one rtc-ds1553.c:259:3: originally declared here Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Alessandro Zummo <alessandro.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Cc: Andrew Sharp <andy.sharp@lsi.com> Cc: Thomas Hommel <thomas.hommel@gefanuc.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-ds1742.c')
-rw-r--r--drivers/rtc/rtc-ds1742.c8
1 files changed, 4 insertions, 4 deletions
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;