summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-m48t35.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-12-23 10:00:05 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-23 10:00:05 -0800
commit193cb93e5a5f32c0520eed17e87135d20594d1e1 (patch)
tree3b5584f4e5e73f5f01807e5176cbe29e1db69868 /drivers/rtc/rtc-m48t35.c
parent23e707dd9b0b26215d801c59e87feed1c218a0f9 (diff)
parentf42ecb2808db5386f983d593a7c08d3ea3b94a27 (diff)
downloadkernel-crypto-193cb93e5a5f32c0520eed17e87135d20594d1e1.tar.gz
kernel-crypto-193cb93e5a5f32c0520eed17e87135d20594d1e1.tar.xz
kernel-crypto-193cb93e5a5f32c0520eed17e87135d20594d1e1.zip
Merge branch 'master' of /home/gregkh/linux/git/torvalds-2.6
Diffstat (limited to 'drivers/rtc/rtc-m48t35.c')
-rw-r--r--drivers/rtc/rtc-m48t35.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/rtc/rtc-m48t35.c b/drivers/rtc/rtc-m48t35.c
index 0b219755994..8cb5b8959e5 100644
--- a/drivers/rtc/rtc-m48t35.c
+++ b/drivers/rtc/rtc-m48t35.c
@@ -142,7 +142,6 @@ static const struct rtc_class_ops m48t35_ops = {
static int __devinit m48t35_probe(struct platform_device *pdev)
{
- struct rtc_device *rtc;
struct resource *res;
struct m48t35_priv *priv;
int ret = 0;
@@ -171,20 +170,21 @@ static int __devinit m48t35_probe(struct platform_device *pdev)
ret = -ENOMEM;
goto out;
}
+
spin_lock_init(&priv->lock);
- rtc = rtc_device_register("m48t35", &pdev->dev,
+
+ platform_set_drvdata(pdev, priv);
+
+ priv->rtc = rtc_device_register("m48t35", &pdev->dev,
&m48t35_ops, THIS_MODULE);
- if (IS_ERR(rtc)) {
- ret = PTR_ERR(rtc);
+ if (IS_ERR(priv->rtc)) {
+ ret = PTR_ERR(priv->rtc);
goto out;
}
- priv->rtc = rtc;
- platform_set_drvdata(pdev, priv);
+
return 0;
out:
- if (priv->rtc)
- rtc_device_unregister(priv->rtc);
if (priv->reg)
iounmap(priv->reg);
if (priv->baseaddr)