Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
[linux-2.6.git] / drivers / rtc / rtc-stk17ta8.c
index 31ea220..6770083 100644 (file)
@@ -247,8 +247,8 @@ static ssize_t stk17ta8_nvram_read(struct kobject *kobj,
                                 struct bin_attribute *attr, char *buf,
                                 loff_t pos, size_t size)
 {
-       struct platform_device *pdev =
-               to_platform_device(container_of(kobj, struct device, kobj));
+       struct device *dev = container_of(kobj, struct device, kobj);
+       struct platform_device *pdev = to_platform_device(dev);
        struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
        void __iomem *ioaddr = pdata->ioaddr;
        ssize_t count;
@@ -262,8 +262,8 @@ static ssize_t stk17ta8_nvram_write(struct kobject *kobj,
                                  struct bin_attribute *attr, char *buf,
                                  loff_t pos, size_t size)
 {
-       struct platform_device *pdev =
-               to_platform_device(container_of(kobj, struct device, kobj));
+       struct device *dev = container_of(kobj, struct device, kobj);
+       struct platform_device *pdev = to_platform_device(dev);
        struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
        void __iomem *ioaddr = pdata->ioaddr;
        ssize_t count;