diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2007-05-08 03:36:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:23 -0400 |
commit | 14a55a6789d8409e58329310f9a18fc141deb4c2 (patch) | |
tree | abacf19d4efb879ffc95a8dc5765fcfdda558667 /drivers | |
parent | f3851e73ecdd070bc379677ed7aad958446f26e7 (diff) |
Char: cyclades, remove some global vars
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/cyclades.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index c7e1433bf8ea..1fe0bb6c7ad7 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c | |||
@@ -818,9 +818,6 @@ static int cy_chip_offset[] = { 0x0000, | |||
818 | 818 | ||
819 | /* PCI related definitions */ | 819 | /* PCI related definitions */ |
820 | 820 | ||
821 | static unsigned short cy_pci_nboard; | ||
822 | static unsigned short cy_isa_nboard; | ||
823 | static unsigned short cy_nboard; | ||
824 | #ifdef CONFIG_PCI | 821 | #ifdef CONFIG_PCI |
825 | static struct pci_device_id cy_pci_dev_id[] __devinitdata = { | 822 | static struct pci_device_id cy_pci_dev_id[] __devinitdata = { |
826 | { PCI_DEVICE(PCI_VENDOR_ID_CYCLADES, PCI_DEVICE_ID_CYCLOM_Y_Lo) }, /* PCI < 1Mb */ | 823 | { PCI_DEVICE(PCI_VENDOR_ID_CYCLADES, PCI_DEVICE_ID_CYCLOM_Y_Lo) }, /* PCI < 1Mb */ |
@@ -5462,7 +5459,7 @@ static const struct tty_operations cy_ops = { | |||
5462 | 5459 | ||
5463 | static int __init cy_init(void) | 5460 | static int __init cy_init(void) |
5464 | { | 5461 | { |
5465 | unsigned int i; | 5462 | unsigned int i, nboards; |
5466 | 5463 | ||
5467 | cy_serial_driver = alloc_tty_driver(NR_PORTS); | 5464 | cy_serial_driver = alloc_tty_driver(NR_PORTS); |
5468 | if (!cy_serial_driver) | 5465 | if (!cy_serial_driver) |
@@ -5506,14 +5503,12 @@ static int __init cy_init(void) | |||
5506 | the cy_next_channel. */ | 5503 | the cy_next_channel. */ |
5507 | 5504 | ||
5508 | /* look for isa boards */ | 5505 | /* look for isa boards */ |
5509 | cy_isa_nboard = cy_detect_isa(); | 5506 | nboards = cy_detect_isa(); |
5510 | 5507 | ||
5511 | /* look for pci boards */ | 5508 | /* look for pci boards */ |
5512 | cy_pci_nboard = cy_detect_pci(); | 5509 | nboards += cy_detect_pci(); |
5513 | |||
5514 | cy_nboard = cy_isa_nboard + cy_pci_nboard; | ||
5515 | 5510 | ||
5516 | return 0; | 5511 | return nboards ? 0 : -ENODEV; |
5517 | } /* cy_init */ | 5512 | } /* cy_init */ |
5518 | 5513 | ||
5519 | static void __exit cy_cleanup_module(void) | 5514 | static void __exit cy_cleanup_module(void) |