diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2007-05-08 00:36:18 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 11:15:23 -0700 |
commit | 14a55a6789d8409e58329310f9a18fc141deb4c2 (patch) | |
tree | abacf19d4efb879ffc95a8dc5765fcfdda558667 /drivers/char/cyclades.c | |
parent | f3851e73ecdd070bc379677ed7aad958446f26e7 (diff) | |
download | kernel_samsung_smdk4412-14a55a6789d8409e58329310f9a18fc141deb4c2.zip kernel_samsung_smdk4412-14a55a6789d8409e58329310f9a18fc141deb4c2.tar.gz kernel_samsung_smdk4412-14a55a6789d8409e58329310f9a18fc141deb4c2.tar.bz2 |
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/char/cyclades.c')
-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 c7e1433..1fe0bb6 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c @@ -818,9 +818,6 @@ static int cy_chip_offset[] = { 0x0000, /* PCI related definitions */ -static unsigned short cy_pci_nboard; -static unsigned short cy_isa_nboard; -static unsigned short cy_nboard; #ifdef CONFIG_PCI static struct pci_device_id cy_pci_dev_id[] __devinitdata = { { 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 = { static int __init cy_init(void) { - unsigned int i; + unsigned int i, nboards; cy_serial_driver = alloc_tty_driver(NR_PORTS); if (!cy_serial_driver) @@ -5506,14 +5503,12 @@ static int __init cy_init(void) the cy_next_channel. */ /* look for isa boards */ - cy_isa_nboard = cy_detect_isa(); + nboards = cy_detect_isa(); /* look for pci boards */ - cy_pci_nboard = cy_detect_pci(); - - cy_nboard = cy_isa_nboard + cy_pci_nboard; + nboards += cy_detect_pci(); - return 0; + return nboards ? 0 : -ENODEV; } /* cy_init */ static void __exit cy_cleanup_module(void) |