diff options
Diffstat (limited to 'drivers/rtc/rtc-pcap.c')
-rw-r--r-- | drivers/rtc/rtc-pcap.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/rtc/rtc-pcap.c b/drivers/rtc/rtc-pcap.c index c05f524ba9af..f176cb9d0dbc 100644 --- a/drivers/rtc/rtc-pcap.c +++ b/drivers/rtc/rtc-pcap.c @@ -43,8 +43,7 @@ static irqreturn_t pcap_rtc_irq(int irq, void *_pcap_rtc) static int pcap_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) { - struct platform_device *pdev = to_platform_device(dev); - struct pcap_rtc *pcap_rtc = platform_get_drvdata(pdev); + struct pcap_rtc *pcap_rtc = dev_get_drvdata(dev); struct rtc_time *tm = &alrm->time; unsigned long secs; u32 tod; /* time of day, seconds since midnight */ @@ -63,8 +62,7 @@ static int pcap_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) static int pcap_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) { - struct platform_device *pdev = to_platform_device(dev); - struct pcap_rtc *pcap_rtc = platform_get_drvdata(pdev); + struct pcap_rtc *pcap_rtc = dev_get_drvdata(dev); struct rtc_time *tm = &alrm->time; unsigned long secs; u32 tod, days; @@ -82,8 +80,7 @@ static int pcap_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) static int pcap_rtc_read_time(struct device *dev, struct rtc_time *tm) { - struct platform_device *pdev = to_platform_device(dev); - struct pcap_rtc *pcap_rtc = platform_get_drvdata(pdev); + struct pcap_rtc *pcap_rtc = dev_get_drvdata(dev); unsigned long secs; u32 tod, days; @@ -100,8 +97,7 @@ static int pcap_rtc_read_time(struct device *dev, struct rtc_time *tm) static int pcap_rtc_set_mmss(struct device *dev, unsigned long secs) { - struct platform_device *pdev = to_platform_device(dev); - struct pcap_rtc *pcap_rtc = platform_get_drvdata(pdev); + struct pcap_rtc *pcap_rtc = dev_get_drvdata(dev); u32 tod, days; tod = secs % SEC_PER_DAY; @@ -115,8 +111,7 @@ static int pcap_rtc_set_mmss(struct device *dev, unsigned long secs) static int pcap_rtc_irq_enable(struct device *dev, int pirq, unsigned int en) { - struct platform_device *pdev = to_platform_device(dev); - struct pcap_rtc *pcap_rtc = platform_get_drvdata(pdev); + struct pcap_rtc *pcap_rtc = dev_get_drvdata(dev); if (en) enable_irq(pcap_to_irq(pcap_rtc->pcap, pirq)); |