Commit fa029a6a authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Fix ppa/imm warnings

From: <viro@parcelfarce.linux.theplanet.co.uk>

Simplify the code, eliminate an unused variable warning.
parent 87afa29a
......@@ -1208,19 +1208,10 @@ static int __imm_attach(struct parport *pb)
goto out1;
/* now the glue ... */
switch (dev->mode) {
case IMM_NIBBLE:
case IMM_PS2:
if (dev->mode == IMM_NIBBLE || dev->mode == IMM_PS2)
ports = 3;
break;
case IMM_EPP_8:
case IMM_EPP_16:
case IMM_EPP_32:
else
ports = 8;
break;
default: /* Never gets here */
BUG();
}
INIT_WORK(&dev->imm_tq, imm_interrupt, dev);
......
......@@ -1069,21 +1069,10 @@ static int __ppa_attach(struct parport *pb)
goto out1;
/* now the glue ... */
switch (dev->mode) {
case PPA_NIBBLE:
ports = 3;
break;
case PPA_PS2:
if (dev->mode == PPA_NIBBLE || dev->mode == PPA_PS2)
ports = 3;
break;
case PPA_EPP_8:
case PPA_EPP_16:
case PPA_EPP_32:
else
ports = 8;
break;
default: /* Never gets here */
BUG();
}
INIT_WORK(&dev->ppa_tq, ppa_interrupt, dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment