Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44485
b: refs/heads/master
c: f3e92d3
h: refs/heads/master
i:
  44483: b67ef55
v: v3
  • Loading branch information
Jan Beulich authored and Linus Torvalds committed Dec 13, 2006
1 parent 04c571c commit a035e4e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e8c5c045d790e7018c56f1a998a2d240b732ea3c
refs/heads/master: f3e92d355e1251fb6d1a15508f2a5448d2354727
8 changes: 8 additions & 0 deletions trunk/drivers/char/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,7 @@ static int __init rtc_init(void)
}
}
#endif
rtc_has_irq = 0;
printk(KERN_ERR "rtc_init: no PC rtc found\n");
return -EIO;

Expand All @@ -972,6 +973,7 @@ static int __init rtc_init(void)
* PCI Slot 2 INTA# (and some INTx# in Slot 1).
*/
if (request_irq(rtc_irq, rtc_interrupt, IRQF_SHARED, "rtc", (void *)&rtc_port)) {
rtc_has_irq = 0;
printk(KERN_ERR "rtc: cannot register IRQ %d\n", rtc_irq);
return -EIO;
}
Expand All @@ -982,6 +984,9 @@ static int __init rtc_init(void)
else
r = request_mem_region(RTC_PORT(0), RTC_IO_EXTENT, "rtc");
if (!r) {
#ifdef RTC_IRQ
rtc_has_irq = 0;
#endif
printk(KERN_ERR "rtc: I/O resource %lx is not free.\n",
(long)(RTC_PORT(0)));
return -EIO;
Expand All @@ -996,6 +1001,7 @@ static int __init rtc_init(void)

if(request_irq(RTC_IRQ, rtc_int_handler_ptr, IRQF_DISABLED, "rtc", NULL)) {
/* Yeah right, seeing as irq 8 doesn't even hit the bus. */
rtc_has_irq = 0;
printk(KERN_ERR "rtc: IRQ %d is not free.\n", RTC_IRQ);
if (RTC_IOMAPPED)
release_region(RTC_PORT(0), RTC_IO_EXTENT);
Expand All @@ -1012,6 +1018,7 @@ static int __init rtc_init(void)
if (misc_register(&rtc_dev)) {
#ifdef RTC_IRQ
free_irq(RTC_IRQ, NULL);
rtc_has_irq = 0;
#endif
release_region(RTC_PORT(0), RTC_IO_EXTENT);
return -ENODEV;
Expand All @@ -1021,6 +1028,7 @@ static int __init rtc_init(void)
if (!ent) {
#ifdef RTC_IRQ
free_irq(RTC_IRQ, NULL);
rtc_has_irq = 0;
#endif
release_region(RTC_PORT(0), RTC_IO_EXTENT);
misc_deregister(&rtc_dev);
Expand Down

0 comments on commit a035e4e

Please sign in to comment.