diff options
-rw-r--r-- | drivers/char/ip2/ip2main.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c index 517271c762e6..2913d05e8257 100644 --- a/drivers/char/ip2/ip2main.c +++ b/drivers/char/ip2/ip2main.c | |||
@@ -263,7 +263,7 @@ static int tracewrap; | |||
263 | /* Macros */ | 263 | /* Macros */ |
264 | /**********/ | 264 | /**********/ |
265 | 265 | ||
266 | #if defined(MODULE) && defined(IP2DEBUG_OPEN) | 266 | #ifdef IP2DEBUG_OPEN |
267 | #define DBG_CNT(s) printk(KERN_DEBUG "(%s): [%x] ttyc=%d, modc=%x -> %s\n", \ | 267 | #define DBG_CNT(s) printk(KERN_DEBUG "(%s): [%x] ttyc=%d, modc=%x -> %s\n", \ |
268 | tty->name,(pCh->flags), \ | 268 | tty->name,(pCh->flags), \ |
269 | tty->count,/*GET_USE_COUNT(module)*/0,s) | 269 | tty->count,/*GET_USE_COUNT(module)*/0,s) |
@@ -487,7 +487,6 @@ static const struct firmware *ip2_request_firmware(void) | |||
487 | return fw; | 487 | return fw; |
488 | } | 488 | } |
489 | 489 | ||
490 | #ifndef MODULE | ||
491 | /****************************************************************************** | 490 | /****************************************************************************** |
492 | * ip2_setup: | 491 | * ip2_setup: |
493 | * str: kernel command line string | 492 | * str: kernel command line string |
@@ -531,7 +530,6 @@ static int __init ip2_setup(char *str) | |||
531 | return 1; | 530 | return 1; |
532 | } | 531 | } |
533 | __setup("ip2=", ip2_setup); | 532 | __setup("ip2=", ip2_setup); |
534 | #endif /* !MODULE */ | ||
535 | 533 | ||
536 | static int __init ip2_loadmain(void) | 534 | static int __init ip2_loadmain(void) |
537 | { | 535 | { |
@@ -539,7 +537,6 @@ static int __init ip2_loadmain(void) | |||
539 | int err = 0; | 537 | int err = 0; |
540 | i2eBordStrPtr pB = NULL; | 538 | i2eBordStrPtr pB = NULL; |
541 | int rc = -1; | 539 | int rc = -1; |
542 | struct pci_dev *pdev = NULL; | ||
543 | const struct firmware *fw = NULL; | 540 | const struct firmware *fw = NULL; |
544 | 541 | ||
545 | if (poll_only) { | 542 | if (poll_only) { |
@@ -612,6 +609,7 @@ static int __init ip2_loadmain(void) | |||
612 | case PCI: | 609 | case PCI: |
613 | #ifdef CONFIG_PCI | 610 | #ifdef CONFIG_PCI |
614 | { | 611 | { |
612 | struct pci_dev *pdev = NULL; | ||
615 | u32 addr; | 613 | u32 addr; |
616 | int status; | 614 | int status; |
617 | 615 | ||
@@ -626,7 +624,7 @@ static int __init ip2_loadmain(void) | |||
626 | 624 | ||
627 | if (pci_enable_device(pdev)) { | 625 | if (pci_enable_device(pdev)) { |
628 | dev_err(&pdev->dev, "can't enable device\n"); | 626 | dev_err(&pdev->dev, "can't enable device\n"); |
629 | break; | 627 | goto out; |
630 | } | 628 | } |
631 | ip2config.type[i] = PCI; | 629 | ip2config.type[i] = PCI; |
632 | ip2config.pci_dev[i] = pci_dev_get(pdev); | 630 | ip2config.pci_dev[i] = pci_dev_get(pdev); |
@@ -638,6 +636,8 @@ static int __init ip2_loadmain(void) | |||
638 | dev_err(&pdev->dev, "I/O address error\n"); | 636 | dev_err(&pdev->dev, "I/O address error\n"); |
639 | 637 | ||
640 | ip2config.irq[i] = pdev->irq; | 638 | ip2config.irq[i] = pdev->irq; |
639 | out: | ||
640 | pci_dev_put(pdev); | ||
641 | } | 641 | } |
642 | #else | 642 | #else |
643 | printk(KERN_ERR "IP2: PCI card specified but PCI " | 643 | printk(KERN_ERR "IP2: PCI card specified but PCI " |
@@ -656,7 +656,6 @@ static int __init ip2_loadmain(void) | |||
656 | break; | 656 | break; |
657 | } /* switch */ | 657 | } /* switch */ |
658 | } /* for */ | 658 | } /* for */ |
659 | pci_dev_put(pdev); | ||
660 | 659 | ||
661 | for (i = 0; i < IP2_MAX_BOARDS; ++i) { | 660 | for (i = 0; i < IP2_MAX_BOARDS; ++i) { |
662 | if (ip2config.addr[i]) { | 661 | if (ip2config.addr[i]) { |