Commit 233b7dfd authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: synaptics - do not try to process packets from slave device

       as if they were coming form the touchpad itself if pass-through
       port is disconnected, just pass them to serio core and it will
       attempt to bind proper driver to the port
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 0edcd2c4
...@@ -233,17 +233,14 @@ static void synaptics_pass_pt_packet(struct serio *ptport, unsigned char *packet ...@@ -233,17 +233,14 @@ static void synaptics_pass_pt_packet(struct serio *ptport, unsigned char *packet
{ {
struct psmouse *child = ptport->private; struct psmouse *child = ptport->private;
if (child) { if (child && child->state == PSMOUSE_ACTIVATED) {
if (child->state == PSMOUSE_ACTIVATED) {
serio_interrupt(ptport, packet[1], 0, NULL); serio_interrupt(ptport, packet[1], 0, NULL);
serio_interrupt(ptport, packet[4], 0, NULL); serio_interrupt(ptport, packet[4], 0, NULL);
serio_interrupt(ptport, packet[5], 0, NULL); serio_interrupt(ptport, packet[5], 0, NULL);
if (child->type >= PSMOUSE_GENPS) if (child->type >= PSMOUSE_GENPS)
serio_interrupt(ptport, packet[2], 0, NULL); serio_interrupt(ptport, packet[2], 0, NULL);
} else if (child->state != PSMOUSE_IGNORE) { } else
serio_interrupt(ptport, packet[1], 0, NULL); serio_interrupt(ptport, packet[1], 0, NULL);
}
}
} }
static void synaptics_pt_activate(struct psmouse *psmouse) static void synaptics_pt_activate(struct psmouse *psmouse)
...@@ -472,9 +469,10 @@ static psmouse_ret_t synaptics_process_byte(struct psmouse *psmouse, struct pt_r ...@@ -472,9 +469,10 @@ static psmouse_ret_t synaptics_process_byte(struct psmouse *psmouse, struct pt_r
if (unlikely(priv->pkt_type == SYN_NEWABS)) if (unlikely(priv->pkt_type == SYN_NEWABS))
priv->pkt_type = synaptics_detect_pkt_type(psmouse); priv->pkt_type = synaptics_detect_pkt_type(psmouse);
if (psmouse->serio->child && psmouse->serio->child->drv && synaptics_is_pt_packet(psmouse->packet)) if (SYN_CAP_PASS_THROUGH(priv->capabilities) && synaptics_is_pt_packet(psmouse->packet)) {
if (psmouse->serio->child)
synaptics_pass_pt_packet(psmouse->serio->child, psmouse->packet); synaptics_pass_pt_packet(psmouse->serio->child, psmouse->packet);
else } else
synaptics_process_packet(psmouse); synaptics_process_packet(psmouse);
return PSMOUSE_FULL_PACKET; return PSMOUSE_FULL_PACKET;
......
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