aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parport/parport_pc.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2006-03-27 04:17:02 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 11:44:52 -0500
commit7597fee389b18e5ed3c8bd58f0012674beb279ed (patch)
tree797e434f56e96e232f662cb8aa668d6962cd10dc /drivers/parport/parport_pc.c
parent1d98af87270cc08bb8251e004b9dc63cc838f24b (diff)
[PATCH] pnp: parport: adjust pnp_register_driver signature
Remove the assumption that pnp_register_driver() returns the number of devices claimed. parport_pc_init() does nothing with "count", so remove it. Then nobody uses the return value of parport_pc_find_ports(), so make it void. Finally, update pnp_register_driver() usage. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Adam Belay <ambx1@neo.rr.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/parport/parport_pc.c')
-rw-r--r--drivers/parport/parport_pc.c31
1 files changed, 11 insertions, 20 deletions
diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
index 9302b8fd7461..d5890027f8af 100644
--- a/drivers/parport/parport_pc.c
+++ b/drivers/parport/parport_pc.c
@@ -3126,9 +3126,9 @@ parport_pc_find_isa_ports (int autoirq, int autodma)
3126 * autoirq is PARPORT_IRQ_NONE, PARPORT_IRQ_AUTO, or PARPORT_IRQ_PROBEONLY 3126 * autoirq is PARPORT_IRQ_NONE, PARPORT_IRQ_AUTO, or PARPORT_IRQ_PROBEONLY
3127 * autodma is PARPORT_DMA_NONE or PARPORT_DMA_AUTO 3127 * autodma is PARPORT_DMA_NONE or PARPORT_DMA_AUTO
3128 */ 3128 */
3129static int __init parport_pc_find_ports (int autoirq, int autodma) 3129static void __init parport_pc_find_ports (int autoirq, int autodma)
3130{ 3130{
3131 int count = 0, r; 3131 int count = 0, err;
3132 3132
3133#ifdef CONFIG_PARPORT_PC_SUPERIO 3133#ifdef CONFIG_PARPORT_PC_SUPERIO
3134 detect_and_report_winbond (); 3134 detect_and_report_winbond ();
@@ -3140,23 +3140,17 @@ static int __init parport_pc_find_ports (int autoirq, int autodma)
3140 3140
3141 /* PnP ports, skip detection if SuperIO already found them */ 3141 /* PnP ports, skip detection if SuperIO already found them */
3142 if (!count) { 3142 if (!count) {
3143 r = pnp_register_driver (&parport_pc_pnp_driver); 3143 err = pnp_register_driver (&parport_pc_pnp_driver);
3144 if (r >= 0) { 3144 if (!err)
3145 pnp_registered_parport = 1; 3145 pnp_registered_parport = 1;
3146 count += r;
3147 }
3148 } 3146 }
3149 3147
3150 /* ISA ports and whatever (see asm/parport.h). */ 3148 /* ISA ports and whatever (see asm/parport.h). */
3151 count += parport_pc_find_nonpci_ports (autoirq, autodma); 3149 parport_pc_find_nonpci_ports (autoirq, autodma);
3152
3153 r = pci_register_driver (&parport_pc_pci_driver);
3154 if (r)
3155 return r;
3156 pci_registered_parport = 1;
3157 count += 1;
3158 3150
3159 return count; 3151 err = pci_register_driver (&parport_pc_pci_driver);
3152 if (!err)
3153 pci_registered_parport = 1;
3160} 3154}
3161 3155
3162/* 3156/*
@@ -3381,8 +3375,6 @@ __setup("parport_init_mode=",parport_init_mode_setup);
3381 3375
3382static int __init parport_pc_init(void) 3376static int __init parport_pc_init(void)
3383{ 3377{
3384 int count = 0;
3385
3386 if (parse_parport_params()) 3378 if (parse_parport_params())
3387 return -EINVAL; 3379 return -EINVAL;
3388 3380
@@ -3395,12 +3387,11 @@ static int __init parport_pc_init(void)
3395 break; 3387 break;
3396 if ((io_hi[i]) == PARPORT_IOHI_AUTO) 3388 if ((io_hi[i]) == PARPORT_IOHI_AUTO)
3397 io_hi[i] = 0x400 + io[i]; 3389 io_hi[i] = 0x400 + io[i];
3398 if (parport_pc_probe_port(io[i], io_hi[i], 3390 parport_pc_probe_port(io[i], io_hi[i],
3399 irqval[i], dmaval[i], NULL)) 3391 irqval[i], dmaval[i], NULL);
3400 count++;
3401 } 3392 }
3402 } else 3393 } else
3403 count += parport_pc_find_ports (irqval[0], dmaval[0]); 3394 parport_pc_find_ports (irqval[0], dmaval[0]);
3404 3395
3405 return 0; 3396 return 0;
3406} 3397}