static int rtc_remove(struct amba_device *dev) { set_rtc = NULL; writel(0, rtc_base + RTC_CR); free_irq(dev->irq[0], dev); unregister_rtc(&rtc_ops); iounmap(rtc_base); rtc_base = NULL; amba_release_regions(dev); return 0; }
static int s3c2410_rtc_remove(struct platform_device *dev) { unregister_rtc(&s3c2410_rtcops); s3c2410_rtc_setpie(0); s3c2410_rtc_setaie(0); if (s3c2410_rtc_mem != NULL) { pr_debug("s3c2410_rtc: releasing s3c2410_rtc_mem\n"); iounmap(s3c2410_rtc_base); release_resource(s3c2410_rtc_mem); kfree(s3c2410_rtc_mem); } return 0; }
static bool_t realview_unregister_rtc(struct resource_t * res) { struct rtc_t * rtc; char name[64]; snprintf(name, sizeof(name), "%s.%d", res->name, res->id); rtc = search_rtc(name); if(!rtc) return FALSE; if(!unregister_rtc(rtc)) return FALSE; free(rtc->name); free(rtc); return TRUE; }