mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
rtc: pxa: fix possible race condition
pxa_rtc_open() registers the interrupt handler which will access the RTC registers. However, pxa_rtc_open() is called before the register range is ioremapped. Instead, call it after devm_ioremap(). Acked-by: Robert Jarzmik <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
This commit is contained in:
parent
be8e274646
commit
56c0c52984
1 changed files with 3 additions and 1 deletions
|
|
@ -348,7 +348,7 @@ static int __init pxa_rtc_probe(struct platform_device *pdev)
|
|||
dev_err(dev, "No alarm IRQ resource defined\n");
|
||||
return -ENXIO;
|
||||
}
|
||||
pxa_rtc_open(dev);
|
||||
|
||||
pxa_rtc->base = devm_ioremap(dev, pxa_rtc->ress->start,
|
||||
resource_size(pxa_rtc->ress));
|
||||
if (!pxa_rtc->base) {
|
||||
|
|
@ -356,6 +356,8 @@ static int __init pxa_rtc_probe(struct platform_device *pdev)
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
pxa_rtc_open(dev);
|
||||
|
||||
sa1100_rtc->rcnr = pxa_rtc->base + 0x0;
|
||||
sa1100_rtc->rtsr = pxa_rtc->base + 0x8;
|
||||
sa1100_rtc->rtar = pxa_rtc->base + 0x4;
|
||||
|
|
|
|||
Loading…
Reference in a new issue