Commit 3b128fe0 authored by Mike Frysinger's avatar Mike Frysinger Committed by Linus Torvalds

blackfin RTC driver: disable the write complete irq upon close

Signed-off-by: default avatarMike Frysinger <vapier.adi@gmail.com>
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
Cc: David Brownell <david-b@pacbell.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 605eb8b3
...@@ -144,13 +144,13 @@ static void bfin_rtc_sync_pending(struct device *dev) ...@@ -144,13 +144,13 @@ static void bfin_rtc_sync_pending(struct device *dev)
* Initialize the RTC. Enable pre-scaler to scale RTC clock * Initialize the RTC. Enable pre-scaler to scale RTC clock
* to 1Hz and clear interrupt/status registers. * to 1Hz and clear interrupt/status registers.
*/ */
static void bfin_rtc_reset(struct device *dev) static void bfin_rtc_reset(struct device *dev, u16 rtc_ictl)
{ {
struct bfin_rtc *rtc = dev_get_drvdata(dev); struct bfin_rtc *rtc = dev_get_drvdata(dev);
dev_dbg_stamp(dev); dev_dbg_stamp(dev);
bfin_rtc_sync_pending(dev); bfin_rtc_sync_pending(dev);
bfin_write_RTC_PREN(0x1); bfin_write_RTC_PREN(0x1);
bfin_write_RTC_ICTL(RTC_ISTAT_WRITE_COMPLETE); bfin_write_RTC_ICTL(rtc_ictl);
bfin_write_RTC_SWCNT(0); bfin_write_RTC_SWCNT(0);
bfin_write_RTC_ALARM(0); bfin_write_RTC_ALARM(0);
bfin_write_RTC_ISTAT(0xFFFF); bfin_write_RTC_ISTAT(0xFFFF);
...@@ -226,7 +226,7 @@ static int bfin_rtc_open(struct device *dev) ...@@ -226,7 +226,7 @@ static int bfin_rtc_open(struct device *dev)
ret = request_irq(IRQ_RTC, bfin_rtc_interrupt, IRQF_SHARED, to_platform_device(dev)->name, dev); ret = request_irq(IRQ_RTC, bfin_rtc_interrupt, IRQF_SHARED, to_platform_device(dev)->name, dev);
if (!ret) if (!ret)
bfin_rtc_reset(dev); bfin_rtc_reset(dev, RTC_ISTAT_WRITE_COMPLETE);
return ret; return ret;
} }
...@@ -234,7 +234,7 @@ static int bfin_rtc_open(struct device *dev) ...@@ -234,7 +234,7 @@ static int bfin_rtc_open(struct device *dev)
static void bfin_rtc_release(struct device *dev) static void bfin_rtc_release(struct device *dev)
{ {
dev_dbg_stamp(dev); dev_dbg_stamp(dev);
bfin_rtc_reset(dev); bfin_rtc_reset(dev, 0);
free_irq(IRQ_RTC, dev); free_irq(IRQ_RTC, dev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment