summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-ep93xx.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-05-12 11:31:13 +0200
committerThomas Gleixner <tglx@linutronix.de>2011-05-12 11:31:13 +0200
commit557d97d57446f55d2c4a66593794ea31ffd0a74d (patch)
tree60a88a0c5a107997c9f19ee37f5de3b9aed1a487 /drivers/rtc/rtc-ep93xx.c
parentclocksource: Install completely before selecting (diff)
parentrtc: mc13xxx: Don't call rtc_device_register while holding lock (diff)
downloadlinux-557d97d57446f55d2c4a66593794ea31ffd0a74d.tar.xz
linux-557d97d57446f55d2c4a66593794ea31ffd0a74d.zip
Merge branch 'fortglx/39/tip/timers/rtc' of git://git.linaro.org/people/jstultz/linux into timers/urgent
Diffstat (limited to 'drivers/rtc/rtc-ep93xx.c')
-rw-r--r--drivers/rtc/rtc-ep93xx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c
index 11ae64dcbf3c..335551d333b2 100644
--- a/drivers/rtc/rtc-ep93xx.c
+++ b/drivers/rtc/rtc-ep93xx.c
@@ -151,6 +151,7 @@ static int __init ep93xx_rtc_probe(struct platform_device *pdev)
return -ENXIO;
pdev->dev.platform_data = ep93xx_rtc;
+ platform_set_drvdata(pdev, rtc);
rtc = rtc_device_register(pdev->name,
&pdev->dev, &ep93xx_rtc_ops, THIS_MODULE);
@@ -159,8 +160,6 @@ static int __init ep93xx_rtc_probe(struct platform_device *pdev)
goto exit;
}
- platform_set_drvdata(pdev, rtc);
-
err = sysfs_create_group(&pdev->dev.kobj, &ep93xx_rtc_sysfs_files);
if (err)
goto fail;
@@ -168,9 +167,9 @@ static int __init ep93xx_rtc_probe(struct platform_device *pdev)
return 0;
fail:
- platform_set_drvdata(pdev, NULL);
rtc_device_unregister(rtc);
exit:
+ platform_set_drvdata(pdev, NULL);
pdev->dev.platform_data = NULL;
return err;
}