From 1f199498414f3b62321c5d84193cea95b388f01b Mon Sep 17 00:00:00 2001 From: Bjorn Helgaas Date: Mon, 27 Mar 2006 01:17:02 -0800 Subject: [PATCH] --- yaml --- r: 24345 b: refs/heads/master c: 7597fee389b18e5ed3c8bd58f0012674beb279ed h: refs/heads/master i: 24343: c36c2df56999e8ff4152a41142a01626388bd195 v: v3 --- [refs] | 2 +- trunk/drivers/parport/parport_pc.c | 31 +++++++++++------------------- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/[refs] b/[refs] index 86850a23bb4e..c0e0370231c9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1d98af87270cc08bb8251e004b9dc63cc838f24b +refs/heads/master: 7597fee389b18e5ed3c8bd58f0012674beb279ed diff --git a/trunk/drivers/parport/parport_pc.c b/trunk/drivers/parport/parport_pc.c index 9302b8fd7461..d5890027f8af 100644 --- a/trunk/drivers/parport/parport_pc.c +++ b/trunk/drivers/parport/parport_pc.c @@ -3126,9 +3126,9 @@ parport_pc_find_isa_ports (int autoirq, int autodma) * autoirq is PARPORT_IRQ_NONE, PARPORT_IRQ_AUTO, or PARPORT_IRQ_PROBEONLY * autodma is PARPORT_DMA_NONE or PARPORT_DMA_AUTO */ -static int __init parport_pc_find_ports (int autoirq, int autodma) +static void __init parport_pc_find_ports (int autoirq, int autodma) { - int count = 0, r; + int count = 0, err; #ifdef CONFIG_PARPORT_PC_SUPERIO detect_and_report_winbond (); @@ -3140,23 +3140,17 @@ static int __init parport_pc_find_ports (int autoirq, int autodma) /* PnP ports, skip detection if SuperIO already found them */ if (!count) { - r = pnp_register_driver (&parport_pc_pnp_driver); - if (r >= 0) { + err = pnp_register_driver (&parport_pc_pnp_driver); + if (!err) pnp_registered_parport = 1; - count += r; - } } /* ISA ports and whatever (see asm/parport.h). */ - count += parport_pc_find_nonpci_ports (autoirq, autodma); - - r = pci_register_driver (&parport_pc_pci_driver); - if (r) - return r; - pci_registered_parport = 1; - count += 1; + parport_pc_find_nonpci_ports (autoirq, autodma); - return count; + err = pci_register_driver (&parport_pc_pci_driver); + if (!err) + pci_registered_parport = 1; } /* @@ -3381,8 +3375,6 @@ __setup("parport_init_mode=",parport_init_mode_setup); static int __init parport_pc_init(void) { - int count = 0; - if (parse_parport_params()) return -EINVAL; @@ -3395,12 +3387,11 @@ static int __init parport_pc_init(void) break; if ((io_hi[i]) == PARPORT_IOHI_AUTO) io_hi[i] = 0x400 + io[i]; - if (parport_pc_probe_port(io[i], io_hi[i], - irqval[i], dmaval[i], NULL)) - count++; + parport_pc_probe_port(io[i], io_hi[i], + irqval[i], dmaval[i], NULL); } } else - count += parport_pc_find_ports (irqval[0], dmaval[0]); + parport_pc_find_ports (irqval[0], dmaval[0]); return 0; }