aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/serial/mos7720.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index 6ba87e6e28c3..b563e2ad8728 100644
--- a/drivers/usb/serial/mos7720.c
+++ b/drivers/usb/serial/mos7720.c
@@ -103,11 +103,9 @@ static void mos7720_interrupt_callback(struct urb *urb)
103{ 103{
104 int result; 104 int result;
105 int length; 105 int length;
106 __u32 *data; 106 __u8 *data;
107 unsigned int status;
108 __u8 sp1; 107 __u8 sp1;
109 __u8 sp2; 108 __u8 sp2;
110 __u8 st;
111 109
112 dbg("%s"," : Entering\n"); 110 dbg("%s"," : Entering\n");
113 111
@@ -141,18 +139,19 @@ static void mos7720_interrupt_callback(struct urb *urb)
141 * Byte 2 IIR Port 2 (port.number is 1) 139 * Byte 2 IIR Port 2 (port.number is 1)
142 * Byte 3 -------------- 140 * Byte 3 --------------
143 * Byte 4 FIFO status for both */ 141 * Byte 4 FIFO status for both */
144 if (length && length > 4) { 142
143 /* the above description is inverted
144 * oneukum 2007-03-14 */
145
146 if (unlikely(length != 4)) {
145 dbg("Wrong data !!!"); 147 dbg("Wrong data !!!");
146 return; 148 return;
147 } 149 }
148 150
149 status = *data; 151 sp1 = data[3];
150 152 sp2 = data[2];
151 sp1 = (status & 0xff000000)>>24;
152 sp2 = (status & 0x00ff0000)>>16;
153 st = status & 0x000000ff;
154 153
155 if ((sp1 & 0x01) || (sp2 & 0x01)) { 154 if ((sp1 | sp2) & 0x01) {
156 /* No Interrupt Pending in both the ports */ 155 /* No Interrupt Pending in both the ports */
157 dbg("No Interrupt !!!"); 156 dbg("No Interrupt !!!");
158 } else { 157 } else {