Commit d2d8d0e5 authored by William Stinson's avatar William Stinson Committed by Jeff Garzik

request_region janitor cleanup for rtc char driver

parent 2aad4762
......@@ -815,7 +815,7 @@ static int __init rtc_init(void)
}
no_irq:
#else
if (check_region (RTC_PORT (0), RTC_IO_EXTENT))
if (!request_region(RTC_PORT(0), RTC_IO_EXTENT, "rtc"))
{
printk(KERN_ERR "rtc: I/O port %d is not free.\n", RTC_PORT (0));
return -EIO;
......@@ -826,11 +826,11 @@ static int __init rtc_init(void)
{
/* Yeah right, seeing as irq 8 doesn't even hit the bus. */
printk(KERN_ERR "rtc: IRQ %d is not free.\n", RTC_IRQ);
release_region(RTC_PORT(0), RTC_IO_EXTENT);
return -EIO;
}
#endif
request_region(RTC_PORT(0), RTC_IO_EXTENT, "rtc");
#endif /* __sparc__ vs. others */
misc_register(&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