diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-03-27 23:54:12 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-03-27 23:54:12 +0000 |
commit | d3e71cb08747743fce908122bab08b479eb403a5 (patch) | |
tree | cbec6948fdbdee9af81cf3ecfb504070d2745d7b /drivers/parport | |
parent | fe7ff1706e323d0e5ed83972960a1ecc1ee538b3 (diff) |
Merge with Linux 2.3.99-pre3.
Diffstat (limited to 'drivers/parport')
-rw-r--r-- | drivers/parport/ChangeLog | 9 | ||||
-rw-r--r-- | drivers/parport/init.c | 6 | ||||
-rw-r--r-- | drivers/parport/parport_pc.c | 7 |
3 files changed, 17 insertions, 5 deletions
diff --git a/drivers/parport/ChangeLog b/drivers/parport/ChangeLog index d2bb93c74..e8bd316e6 100644 --- a/drivers/parport/ChangeLog +++ b/drivers/parport/ChangeLog @@ -1,3 +1,12 @@ +2000-03-22 Tim Waugh <twaugh@redhat.com> + + * init.c (parport_setup): Fix return value. + +2000-03-21 Tim Waugh <twaugh@redhat.com> + + * parport_pc.c (parport_pc_pci_probe): Fix return value; call + pci_enable_device. + 2000-03-16 Tim Waugh <twaugh@redhat.com> * parport_pc.c (parport_ECP_supported): This seems to trigger on diff --git a/drivers/parport/init.c b/drivers/parport/init.c index a43d59dbe..8ad352774 100644 --- a/drivers/parport/init.c +++ b/drivers/parport/init.c @@ -49,13 +49,13 @@ static int __init parport_setup (char *str) if (!str || !*str || (*str == '0' && !*(str+1))) { /* Disable parport if "parport=0" in cmdline */ io[0] = PARPORT_DISABLE; - return 0; + return 1; } if (!strncmp (str, "auto", 4)) { irq[0] = PARPORT_IRQ_AUTO; dma[0] = PARPORT_DMA_AUTO; - return 0; + return 1; } val = simple_strtoul (str, &endptr, 0); @@ -108,7 +108,7 @@ static int __init parport_setup (char *str) } parport_setup_ptr++; - return 0; + return 1; } __setup ("parport=", parport_setup); diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index dbbd12864..16b5ea3fe 100644 --- a/drivers/parport/parport_pc.c +++ b/drivers/parport/parport_pc.c @@ -2348,7 +2348,7 @@ MODULE_DEVICE_TABLE(pci,parport_pc_pci_tbl); static int __devinit parport_pc_pci_probe (struct pci_dev *dev, const struct pci_device_id *id) { - int count, n, i = id->driver_data; + int err, count, n, i = id->driver_data; if (i < last_sio) /* This is an onboard Super-IO and has already been probed */ return 0; @@ -2356,6 +2356,9 @@ static int __devinit parport_pc_pci_probe (struct pci_dev *dev, /* This is a PCI card */ i -= last_sio; count = 0; + if ((err = pci_enable_device (dev)) != 0) + return err; + for (n = 0; n < cards[i].numports; n++) { int lo = cards[i].addr[n].lo; int hi = cards[i].addr[n].hi; @@ -2370,7 +2373,7 @@ static int __devinit parport_pc_pci_probe (struct pci_dev *dev, count++; } - return count; + return count == 0 ? -ENODEV : 0; } static struct pci_driver parport_pc_pci_driver = { |