diff options
Diffstat (limited to 'drivers/rtc/rtc-max8925.c')
-rw-r--r-- | drivers/rtc/rtc-max8925.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-max8925.c b/drivers/rtc/rtc-max8925.c index 174036dda786..3bc046f427e0 100644 --- a/drivers/rtc/rtc-max8925.c +++ b/drivers/rtc/rtc-max8925.c | |||
@@ -257,6 +257,10 @@ static int __devinit max8925_rtc_probe(struct platform_device *pdev) | |||
257 | goto out_irq; | 257 | goto out_irq; |
258 | } | 258 | } |
259 | 259 | ||
260 | dev_set_drvdata(&pdev->dev, info); | ||
261 | /* XXX - isn't this redundant? */ | ||
262 | platform_set_drvdata(pdev, info); | ||
263 | |||
260 | info->rtc_dev = rtc_device_register("max8925-rtc", &pdev->dev, | 264 | info->rtc_dev = rtc_device_register("max8925-rtc", &pdev->dev, |
261 | &max8925_rtc_ops, THIS_MODULE); | 265 | &max8925_rtc_ops, THIS_MODULE); |
262 | ret = PTR_ERR(info->rtc_dev); | 266 | ret = PTR_ERR(info->rtc_dev); |
@@ -265,11 +269,9 @@ static int __devinit max8925_rtc_probe(struct platform_device *pdev) | |||
265 | goto out_rtc; | 269 | goto out_rtc; |
266 | } | 270 | } |
267 | 271 | ||
268 | dev_set_drvdata(&pdev->dev, info); | ||
269 | platform_set_drvdata(pdev, info); | ||
270 | |||
271 | return 0; | 272 | return 0; |
272 | out_rtc: | 273 | out_rtc: |
274 | platform_set_drvdata(pdev, NULL); | ||
273 | free_irq(chip->irq_base + MAX8925_IRQ_RTC_ALARM0, info); | 275 | free_irq(chip->irq_base + MAX8925_IRQ_RTC_ALARM0, info); |
274 | out_irq: | 276 | out_irq: |
275 | kfree(info); | 277 | kfree(info); |