aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-v3020.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/rtc-v3020.c')
-rw-r--r--drivers/rtc/rtc-v3020.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-v3020.c b/drivers/rtc/rtc-v3020.c
index ad741afd47d8..bed4cab07043 100644
--- a/drivers/rtc/rtc-v3020.c
+++ b/drivers/rtc/rtc-v3020.c
@@ -304,7 +304,6 @@ static int rtc_probe(struct platform_device *pdev)
304{ 304{
305 struct v3020_platform_data *pdata = pdev->dev.platform_data; 305 struct v3020_platform_data *pdata = pdev->dev.platform_data;
306 struct v3020 *chip; 306 struct v3020 *chip;
307 struct rtc_device *rtc;
308 int retval = -EBUSY; 307 int retval = -EBUSY;
309 int i; 308 int i;
310 int temp; 309 int temp;
@@ -353,13 +352,12 @@ static int rtc_probe(struct platform_device *pdev)
353 352
354 platform_set_drvdata(pdev, chip); 353 platform_set_drvdata(pdev, chip);
355 354
356 rtc = rtc_device_register("v3020", 355 chip->rtc = rtc_device_register("v3020",
357 &pdev->dev, &v3020_rtc_ops, THIS_MODULE); 356 &pdev->dev, &v3020_rtc_ops, THIS_MODULE);
358 if (IS_ERR(rtc)) { 357 if (IS_ERR(chip->rtc)) {
359 retval = PTR_ERR(rtc); 358 retval = PTR_ERR(chip->rtc);
360 goto err_io; 359 goto err_io;
361 } 360 }
362 chip->rtc = rtc;
363 361
364 return 0; 362 return 0;
365 363