/* 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 */
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)
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)