summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/rtc/rtc-max8907c.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-max8907c.c b/drivers/rtc/rtc-max8907c.c
index 936f133f67c1..668bc43461ba 100644
--- a/drivers/rtc/rtc-max8907c.c
+++ b/drivers/rtc/rtc-max8907c.c
@@ -229,6 +229,7 @@ static int __devinit max8907c_rtc_probe(struct platform_device *pdev)
goto out_irq;
}
+ dev_set_drvdata(&pdev->dev, info);
info->rtc_dev = rtc_device_register("max8907c-rtc", &pdev->dev,
&max8907c_rtc_ops, THIS_MODULE);
ret = PTR_ERR(info->rtc_dev);
@@ -239,8 +240,6 @@ static int __devinit max8907c_rtc_probe(struct platform_device *pdev)
max8907c_set_bits(chip->i2c_power, MAX8907C_REG_SYSENSEL, 0x2, 0x2);
- dev_set_drvdata(&pdev->dev, info);
-
platform_set_drvdata(pdev, info);
device_init_wakeup(&pdev->dev, 1);