static struct resource jz4740_rtc_resources[] = {
[0] = {
.start = CPHYSADDR(RTC_BASE),
- .end = CPHYSADDR(RTC_BASE) + 0x10,
+ .end = CPHYSADDR(RTC_BASE) + 0x38 - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
}
ret = request_irq(rtc->irq, jz4740_rtc_irq, 0,
- pdev->name, rtc);
+ pdev->name, rtc);
if (ret) {
dev_err(&pdev->dev, "Failed to request rtc irq: %d\n", ret);
{
struct jz4740_rtc *rtc = platform_get_drvdata(pdev);
+ free_irq(rtc->irq, rtc);
+
rtc_device_unregister(rtc->rtc);
iounmap(rtc->base);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("RTC driver for the JZ4720/JZ4740 SoC\n");
MODULE_ALIAS("platform:jz4740-rtc");
-MODULE_ALIAS("platform:jz4720-rtc");