diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-09-20 14:24:58 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-20 14:25:03 -0400 |
commit | bfefb7a0c6e08736f2d5917c468467f134bf28bb (patch) | |
tree | 7aa7084114dc083fe5b4d7b532901bdeb67188e7 /drivers/watchdog/wdt_pci.c | |
parent | 8d0cc631f6dd0a9283ceb7d61d8b85ecbcd355ea (diff) | |
parent | 78f28b7c555359c67c2a0d23f7436e915329421e (diff) |
Merge branch 'linus' into x86/urgent
Merge reason: Bring in changes that the next patch will depend on.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/watchdog/wdt_pci.c')
-rw-r--r-- | drivers/watchdog/wdt_pci.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/watchdog/wdt_pci.c b/drivers/watchdog/wdt_pci.c index 7a1bdc7c95a9..f368dd87083a 100644 --- a/drivers/watchdog/wdt_pci.c +++ b/drivers/watchdog/wdt_pci.c | |||
@@ -80,7 +80,7 @@ static unsigned long open_lock; | |||
80 | static DEFINE_SPINLOCK(wdtpci_lock); | 80 | static DEFINE_SPINLOCK(wdtpci_lock); |
81 | static char expect_close; | 81 | static char expect_close; |
82 | 82 | ||
83 | static int io; | 83 | static resource_size_t io; |
84 | static int irq; | 84 | static int irq; |
85 | 85 | ||
86 | /* Default timeout */ | 86 | /* Default timeout */ |
@@ -647,14 +647,15 @@ static int __devinit wdtpci_init_one(struct pci_dev *dev, | |||
647 | goto out_pci; | 647 | goto out_pci; |
648 | } | 648 | } |
649 | 649 | ||
650 | irq = dev->irq; | 650 | if (pci_request_region(dev, 2, "wdt_pci")) { |
651 | io = pci_resource_start(dev, 2); | 651 | printk(KERN_ERR PFX "I/O address 0x%llx already in use\n", |
652 | 652 | (unsigned long long)pci_resource_start(dev, 2)); | |
653 | if (request_region(io, 16, "wdt_pci") == NULL) { | ||
654 | printk(KERN_ERR PFX "I/O address 0x%04x already in use\n", io); | ||
655 | goto out_pci; | 653 | goto out_pci; |
656 | } | 654 | } |
657 | 655 | ||
656 | irq = dev->irq; | ||
657 | io = pci_resource_start(dev, 2); | ||
658 | |||
658 | if (request_irq(irq, wdtpci_interrupt, IRQF_DISABLED | IRQF_SHARED, | 659 | if (request_irq(irq, wdtpci_interrupt, IRQF_DISABLED | IRQF_SHARED, |
659 | "wdt_pci", &wdtpci_miscdev)) { | 660 | "wdt_pci", &wdtpci_miscdev)) { |
660 | printk(KERN_ERR PFX "IRQ %d is not free\n", irq); | 661 | printk(KERN_ERR PFX "IRQ %d is not free\n", irq); |
@@ -662,8 +663,8 @@ static int __devinit wdtpci_init_one(struct pci_dev *dev, | |||
662 | } | 663 | } |
663 | 664 | ||
664 | printk(KERN_INFO | 665 | printk(KERN_INFO |
665 | "PCI-WDT500/501 (PCI-WDG-CSM) driver 0.10 at 0x%04x (Interrupt %d)\n", | 666 | "PCI-WDT500/501 (PCI-WDG-CSM) driver 0.10 at 0x%llx (Interrupt %d)\n", |
666 | io, irq); | 667 | (unsigned long long)io, irq); |
667 | 668 | ||
668 | /* Check that the heartbeat value is within its range; | 669 | /* Check that the heartbeat value is within its range; |
669 | if not reset to the default */ | 670 | if not reset to the default */ |
@@ -717,7 +718,7 @@ out_rbt: | |||
717 | out_irq: | 718 | out_irq: |
718 | free_irq(irq, &wdtpci_miscdev); | 719 | free_irq(irq, &wdtpci_miscdev); |
719 | out_reg: | 720 | out_reg: |
720 | release_region(io, 16); | 721 | pci_release_region(dev, 2); |
721 | out_pci: | 722 | out_pci: |
722 | pci_disable_device(dev); | 723 | pci_disable_device(dev); |
723 | goto out; | 724 | goto out; |
@@ -733,7 +734,7 @@ static void __devexit wdtpci_remove_one(struct pci_dev *pdev) | |||
733 | misc_deregister(&temp_miscdev); | 734 | misc_deregister(&temp_miscdev); |
734 | unregister_reboot_notifier(&wdtpci_notifier); | 735 | unregister_reboot_notifier(&wdtpci_notifier); |
735 | free_irq(irq, &wdtpci_miscdev); | 736 | free_irq(irq, &wdtpci_miscdev); |
736 | release_region(io, 16); | 737 | pci_release_region(pdev, 2); |
737 | pci_disable_device(pdev); | 738 | pci_disable_device(pdev); |
738 | dev_count--; | 739 | dev_count--; |
739 | } | 740 | } |