diff options
Diffstat (limited to 'drivers/char/lp.c')
-rw-r--r-- | drivers/char/lp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/char/lp.c b/drivers/char/lp.c index e21ed4007d0f..0e081f521f51 100644 --- a/drivers/char/lp.c +++ b/drivers/char/lp.c @@ -958,7 +958,11 @@ static void lp_attach(struct parport *port) printk(KERN_INFO "lp: ignoring parallel port (max. %d)\n",LP_NO); return; } - if (!lp_register(lp_count, port)) + for (i = 0; i < LP_NO; i++) + if (port_num[i] == -1) + break; + + if (!lp_register(i, port)) lp_count++; break; |