projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
271ec2d
)
USB: oti6858: only wake up MSR queue on changes
author
Johan Hovold
<jhovold@gmail.com>
Thu, 2 Jan 2014 21:49:34 +0000
(22:49 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 3 Jan 2014 20:42:24 +0000
(12:42 -0800)
Only wake up MSR wait queue on actual modem-status changes.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/oti6858.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/serial/oti6858.c
b/drivers/usb/serial/oti6858.c
index 1dea599bb71bb2ff9072fc15210b974ca907a066..9ea15e0a22d8552d32205ce07d224ff315b7182a 100644
(file)
--- a/
drivers/usb/serial/oti6858.c
+++ b/
drivers/usb/serial/oti6858.c
@@
-103,6
+103,7
@@
struct oti6858_control_pkt {
#define TX_BUFFER_EMPTIED 0x09
u8 pin_state;
#define PIN_MASK 0x3f
+#define PIN_MSR_MASK 0x1b
#define PIN_RTS 0x20 /* output pin */
#define PIN_CTS 0x10 /* input pin, active low */
#define PIN_DSR 0x08 /* input pin, active low */
@@
-739,8
+740,11
@@
static void oti6858_read_int_callback(struct urb *urb)
}
if (!priv->transient) {
- if (xs->pin_state != priv->status.pin_state)
+ u8 delta = xs->pin_state ^ priv->status.pin_state;
+
+ if (delta & PIN_MSR_MASK)
wake_up_interruptible(&port->port.delta_msr_wait);
+
memcpy(&priv->status, xs, OTI6858_CTRL_PKT_SIZE);
}