diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-17 17:02:04 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-17 17:02:04 +0200 |
commit | a085963a2757b9ab0a7ec1cf4a14aa85935c1e2a (patch) | |
tree | 65ba9b826cf1b2311534e10b944175a83467d654 /drivers/rtc/rtc-mc13xxx.c | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 (diff) | |
parent | tick: Clear broadcast active bit when switching to oneshot (diff) | |
download | linux-a085963a2757b9ab0a7ec1cf4a14aa85935c1e2a.tar.xz linux-a085963a2757b9ab0a7ec1cf4a14aa85935c1e2a.zip |
Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
tick: Clear broadcast active bit when switching to oneshot
rtc: mc13xxx: Don't call rtc_device_register while holding lock
rtc: rp5c01: Initialize drvdata before registering device
rtc: pcap: Initialize drvdata before registering device
rtc: msm6242: Initialize drvdata before registering device
rtc: max8998: Initialize drvdata before registering device
rtc: max8925: Initialize drvdata before registering device
rtc: m41t80: Initialize clientdata before registering device
rtc: ds1286: Initialize drvdata before registering device
rtc: ep93xx: Initialize drvdata before registering device
rtc: davinci: Initialize drvdata before registering device
rtc: mxc: Initialize drvdata before registering device
clocksource: Install completely before selecting
Diffstat (limited to 'drivers/rtc/rtc-mc13xxx.c')
-rw-r--r-- | drivers/rtc/rtc-mc13xxx.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-mc13xxx.c b/drivers/rtc/rtc-mc13xxx.c index c5ac03793e79..a1a278bc340d 100644 --- a/drivers/rtc/rtc-mc13xxx.c +++ b/drivers/rtc/rtc-mc13xxx.c @@ -349,11 +349,15 @@ static int __devinit mc13xxx_rtc_probe(struct platform_device *pdev) if (ret) goto err_alarm_irq_request; + mc13xxx_unlock(mc13xxx); + priv->rtc = rtc_device_register(pdev->name, &pdev->dev, &mc13xxx_rtc_ops, THIS_MODULE); if (IS_ERR(priv->rtc)) { ret = PTR_ERR(priv->rtc); + mc13xxx_lock(mc13xxx); + mc13xxx_irq_free(mc13xxx, MC13XXX_IRQ_TODA, priv); err_alarm_irq_request: @@ -365,12 +369,12 @@ err_reset_irq_status: mc13xxx_irq_free(mc13xxx, MC13XXX_IRQ_RTCRST, priv); err_reset_irq_request: + mc13xxx_unlock(mc13xxx); + platform_set_drvdata(pdev, NULL); kfree(priv); } - mc13xxx_unlock(mc13xxx); - return ret; } |