Skip to contentSkip to conversation

typo in drivers/usb/class/usblp.c (resend)

PATCH In review Benoît Dejean 2 participants 2 messages May 24, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 typo in drivers/usb/class/usblp.c (resend)

i think there's a typo error in usblp.c

patch against 2.6.6

--- linux-2.6.6/drivers/usb/class/usblp.c 2004-04-04
05:36:26.000000000
+0200
+++ linux-2.6.6-modified/drivers/usb/class/usblp.c 2004-05-24
01:15:20.000000000 +0200
@@ -305,7 +305,7 @@

if (~status & LP_PERRORP)
newerr = 3;
- if (status & LP_POUTPA)
+ if (~status & LP_POUTPA)

                newerr = 1;
        if (~status & LP_PSELECD)
                newerr = 2;
Signature · 4 lines
Benoît Dejean
JID: [email protected]
http://gdesklets.gnomedesktop.org
http://www.paulla.asso.fr
#1 lore raw

On Mon, 24 May 2004 12:11:29 +0200 Benoît Dejean wrote:

| i think there's a typo error in usblp.c
| 
| patch against 2.6.6
| 
| --- linux-2.6.6/drivers/usb/class/usblp.c       2004-04-04
| 05:36:26.000000000
| +0200
| +++ linux-2.6.6-modified/drivers/usb/class/usblp.c      2004-05-24
| 01:15:20.000000000 +0200
| @@ -305,7 +305,7 @@
|  
|         if (~status & LP_PERRORP)
|                 newerr = 3;
| -       if (status & LP_POUTPA)
| +       if (~status & LP_POUTPA)
|                 newerr = 1;
|         if (~status & LP_PSELECD)
|                 newerr = 2;
| -- 

Why do you think that there is a typo? Did you check the USB printer specification?

LP_PERRORP == 0 means Error.
LP_PSELECD == 0 means Not Selected (or means User disabled the printer). LP_POUTPA == 1 means Paper Empty.

See, LP_POUTPA has different error polarity than the other bits.

I don't see a problem. Are you experiencing some problem with a USB printer?

--
~Randy