diff options
Diffstat (limited to 'drivers/rtc/rtc-tps80031.c')
-rw-r--r-- | drivers/rtc/rtc-tps80031.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-tps80031.c b/drivers/rtc/rtc-tps80031.c index b2b9d04171c5..44013e13fe43 100644 --- a/drivers/rtc/rtc-tps80031.c +++ b/drivers/rtc/rtc-tps80031.c @@ -349,12 +349,20 @@ static irqreturn_t tps80031_rtc_irq(int irq, void *data) static int __devinit tps80031_rtc_probe(struct platform_device *pdev) { - struct tps80031_rtc_platform_data *pdata = pdev->dev.platform_data; + struct tps80031_platform_data *tps80031_pdata; + struct tps80031_rtc_platform_data *pdata; struct tps80031_rtc *rtc; struct rtc_time tm; int err; u8 reg; + tps80031_pdata = dev_get_platdata(pdev->dev.parent); + if (!tps80031_pdata) { + dev_err(&pdev->dev, "no tps80031 platform_data specified\n"); + return -EINVAL; + } + + pdata = tps80031_pdata->rtc_pdata; if (!pdata) { dev_err(&pdev->dev, "no platform_data specified\n"); return -EINVAL; @@ -469,7 +477,7 @@ static int __devexit tps80031_rtc_remove(struct platform_device *pdev) static struct platform_driver tps80031_rtc_driver = { .driver = { - .name = "rtc_tps80031", + .name = "tps80031-rtc", .owner = THIS_MODULE, }, .probe = tps80031_rtc_probe, |