diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-22 05:38:49 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-22 05:38:49 +0400 |
commit | 7c2db36e730ee4facd341679ecb21ee73ba92831 (patch) | |
tree | 75016fba72aaf0581b9263f7fa4c565e6e634f3c /drivers/rtc/rtc-davinci.c | |
parent | 8b5628ab83b671f96ac9f174c1bd51c92589fc82 (diff) | |
parent | a47a376f1c025e23e836c0376813c0424de665c2 (diff) | |
download | linux-7c2db36e730ee4facd341679ecb21ee73ba92831.tar.xz |
Merge branch 'akpm' (incoming from Andrew)
Merge misc patches from Andrew Morton:
- Florian has vanished so I appear to have become fbdev maintainer
again :(
- Joel and Mark are distracted to welcome to the new OCFS2 maintainer
- The backlight queue
- Small core kernel changes
- lib/ updates
- The rtc queue
- Various random bits
* akpm: (164 commits)
rtc: rtc-davinci: use devm_*() functions
rtc: rtc-max8997: use devm_request_threaded_irq()
rtc: rtc-max8907: use devm_request_threaded_irq()
rtc: rtc-da9052: use devm_request_threaded_irq()
rtc: rtc-wm831x: use devm_request_threaded_irq()
rtc: rtc-tps80031: use devm_request_threaded_irq()
rtc: rtc-lp8788: use devm_request_threaded_irq()
rtc: rtc-coh901331: use devm_clk_get()
rtc: rtc-vt8500: use devm_*() functions
rtc: rtc-tps6586x: use devm_request_threaded_irq()
rtc: rtc-imxdi: use devm_clk_get()
rtc: rtc-cmos: use dev_warn()/dev_dbg() instead of printk()/pr_debug()
rtc: rtc-pcf8583: use dev_warn() instead of printk()
rtc: rtc-sun4v: use pr_warn() instead of printk()
rtc: rtc-vr41xx: use dev_info() instead of printk()
rtc: rtc-rs5c313: use pr_err() instead of printk()
rtc: rtc-at91rm9200: use dev_dbg()/dev_err() instead of printk()/pr_debug()
rtc: rtc-rs5c372: use dev_dbg()/dev_warn() instead of printk()/pr_debug()
rtc: rtc-ds2404: use dev_err() instead of printk()
rtc: rtc-efi: use dev_err()/dev_warn()/pr_err() instead of printk()
...
Diffstat (limited to 'drivers/rtc/rtc-davinci.c')
-rw-r--r-- | drivers/rtc/rtc-davinci.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/drivers/rtc/rtc-davinci.c b/drivers/rtc/rtc-davinci.c index 5f7982f7c1b5..56b73089bb29 100644 --- a/drivers/rtc/rtc-davinci.c +++ b/drivers/rtc/rtc-davinci.c @@ -506,19 +506,19 @@ static int __init davinci_rtc_probe(struct platform_device *pdev) davinci_rtc->pbase = res->start; davinci_rtc->base_size = resource_size(res); - mem = request_mem_region(davinci_rtc->pbase, davinci_rtc->base_size, - pdev->name); + mem = devm_request_mem_region(dev, davinci_rtc->pbase, + davinci_rtc->base_size, pdev->name); if (!mem) { dev_err(dev, "RTC registers at %08x are not free\n", davinci_rtc->pbase); return -EBUSY; } - davinci_rtc->base = ioremap(davinci_rtc->pbase, davinci_rtc->base_size); + davinci_rtc->base = devm_ioremap(dev, davinci_rtc->pbase, + davinci_rtc->base_size); if (!davinci_rtc->base) { dev_err(dev, "unable to ioremap MEM resource\n"); - ret = -ENOMEM; - goto fail2; + return -ENOMEM; } platform_set_drvdata(pdev, davinci_rtc); @@ -529,7 +529,7 @@ static int __init davinci_rtc_probe(struct platform_device *pdev) ret = PTR_ERR(davinci_rtc->rtc); dev_err(dev, "unable to register RTC device, err %d\n", ret); - goto fail3; + goto fail1; } rtcif_write(davinci_rtc, PRTCIF_INTFLG_RTCSS, PRTCIF_INTFLG); @@ -539,11 +539,11 @@ static int __init davinci_rtc_probe(struct platform_device *pdev) rtcss_write(davinci_rtc, 0, PRTCSS_RTC_CTRL); rtcss_write(davinci_rtc, 0, PRTCSS_RTC_CCTRL); - ret = request_irq(davinci_rtc->irq, davinci_rtc_interrupt, + ret = devm_request_irq(dev, davinci_rtc->irq, davinci_rtc_interrupt, 0, "davinci_rtc", davinci_rtc); if (ret < 0) { dev_err(dev, "unable to register davinci RTC interrupt\n"); - goto fail4; + goto fail2; } /* Enable interrupts */ @@ -557,13 +557,10 @@ static int __init davinci_rtc_probe(struct platform_device *pdev) return 0; -fail4: +fail2: rtc_device_unregister(davinci_rtc->rtc); -fail3: +fail1: platform_set_drvdata(pdev, NULL); - iounmap(davinci_rtc->base); -fail2: - release_mem_region(davinci_rtc->pbase, davinci_rtc->base_size); return ret; } @@ -575,13 +572,8 @@ static int davinci_rtc_remove(struct platform_device *pdev) rtcif_write(davinci_rtc, 0, PRTCIF_INTEN); - free_irq(davinci_rtc->irq, davinci_rtc); - rtc_device_unregister(davinci_rtc->rtc); - iounmap(davinci_rtc->base); - release_mem_region(davinci_rtc->pbase, davinci_rtc->base_size); - platform_set_drvdata(pdev, NULL); return 0; |