diff options
Diffstat (limited to 'drivers/rtc/rtc-88pm80x.c')
-rw-r--r-- | drivers/rtc/rtc-88pm80x.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-88pm80x.c b/drivers/rtc/rtc-88pm80x.c index 354c937a5866..0916089c7c3e 100644 --- a/drivers/rtc/rtc-88pm80x.c +++ b/drivers/rtc/rtc-88pm80x.c | |||
@@ -251,14 +251,15 @@ static SIMPLE_DEV_PM_OPS(pm80x_rtc_pm_ops, pm80x_rtc_suspend, pm80x_rtc_resume); | |||
251 | static int pm80x_rtc_probe(struct platform_device *pdev) | 251 | static int pm80x_rtc_probe(struct platform_device *pdev) |
252 | { | 252 | { |
253 | struct pm80x_chip *chip = dev_get_drvdata(pdev->dev.parent); | 253 | struct pm80x_chip *chip = dev_get_drvdata(pdev->dev.parent); |
254 | struct pm80x_platform_data *pm80x_pdata; | 254 | struct pm80x_platform_data *pm80x_pdata = |
255 | dev_get_platdata(pdev->dev.parent); | ||
255 | struct pm80x_rtc_pdata *pdata = NULL; | 256 | struct pm80x_rtc_pdata *pdata = NULL; |
256 | struct pm80x_rtc_info *info; | 257 | struct pm80x_rtc_info *info; |
257 | struct rtc_time tm; | 258 | struct rtc_time tm; |
258 | unsigned long ticks = 0; | 259 | unsigned long ticks = 0; |
259 | int ret; | 260 | int ret; |
260 | 261 | ||
261 | pdata = pdev->dev.platform_data; | 262 | pdata = dev_get_platdata(&pdev->dev); |
262 | if (pdata == NULL) | 263 | if (pdata == NULL) |
263 | dev_warn(&pdev->dev, "No platform data!\n"); | 264 | dev_warn(&pdev->dev, "No platform data!\n"); |
264 | 265 | ||
@@ -326,8 +327,7 @@ static int pm80x_rtc_probe(struct platform_device *pdev) | |||
326 | regmap_update_bits(info->map, PM800_RTC_CONTROL, PM800_RTC1_USE_XO, | 327 | regmap_update_bits(info->map, PM800_RTC_CONTROL, PM800_RTC1_USE_XO, |
327 | PM800_RTC1_USE_XO); | 328 | PM800_RTC1_USE_XO); |
328 | 329 | ||
329 | if (pdev->dev.parent->platform_data) { | 330 | if (pm80x_pdata) { |
330 | pm80x_pdata = pdev->dev.parent->platform_data; | ||
331 | pdata = pm80x_pdata->rtc; | 331 | pdata = pm80x_pdata->rtc; |
332 | if (pdata) | 332 | if (pdata) |
333 | info->rtc_dev->dev.platform_data = &pdata->rtc_wakeup; | 333 | info->rtc_dev->dev.platform_data = &pdata->rtc_wakeup; |