diff options
Diffstat (limited to 'drivers/rtc/rtc-bq4802.c')
-rw-r--r-- | drivers/rtc/rtc-bq4802.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-bq4802.c b/drivers/rtc/rtc-bq4802.c index d00a274df8fc..128270ce355d 100644 --- a/drivers/rtc/rtc-bq4802.c +++ b/drivers/rtc/rtc-bq4802.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/platform_device.h> | 10 | #include <linux/platform_device.h> |
11 | #include <linux/rtc.h> | 11 | #include <linux/rtc.h> |
12 | #include <linux/bcd.h> | 12 | #include <linux/bcd.h> |
13 | #include <linux/slab.h> | ||
13 | 14 | ||
14 | MODULE_AUTHOR("David S. Miller <davem@davemloft.net>"); | 15 | MODULE_AUTHOR("David S. Miller <davem@davemloft.net>"); |
15 | MODULE_DESCRIPTION("TI BQ4802 RTC driver"); | 16 | MODULE_DESCRIPTION("TI BQ4802 RTC driver"); |
@@ -169,6 +170,8 @@ static int __devinit bq4802_probe(struct platform_device *pdev) | |||
169 | goto out_free; | 170 | goto out_free; |
170 | } | 171 | } |
171 | 172 | ||
173 | platform_set_drvdata(pdev, p); | ||
174 | |||
172 | p->rtc = rtc_device_register("bq4802", &pdev->dev, | 175 | p->rtc = rtc_device_register("bq4802", &pdev->dev, |
173 | &bq4802_ops, THIS_MODULE); | 176 | &bq4802_ops, THIS_MODULE); |
174 | if (IS_ERR(p->rtc)) { | 177 | if (IS_ERR(p->rtc)) { |
@@ -176,7 +179,6 @@ static int __devinit bq4802_probe(struct platform_device *pdev) | |||
176 | goto out_iounmap; | 179 | goto out_iounmap; |
177 | } | 180 | } |
178 | 181 | ||
179 | platform_set_drvdata(pdev, p); | ||
180 | err = 0; | 182 | err = 0; |
181 | out: | 183 | out: |
182 | return err; | 184 | return err; |