diff options
| -rw-r--r-- | drivers/input/mouse/alps.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 27bcdbc950c9..ea6cb64dfb28 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
| @@ -1159,13 +1159,14 @@ static void alps_report_bare_ps2_packet(struct psmouse *psmouse, | |||
| 1159 | bool report_buttons) | 1159 | bool report_buttons) |
| 1160 | { | 1160 | { |
| 1161 | struct alps_data *priv = psmouse->private; | 1161 | struct alps_data *priv = psmouse->private; |
| 1162 | struct input_dev *dev; | 1162 | struct input_dev *dev, *dev2 = NULL; |
| 1163 | 1163 | ||
| 1164 | /* Figure out which device to use to report the bare packet */ | 1164 | /* Figure out which device to use to report the bare packet */ |
| 1165 | if (priv->proto_version == ALPS_PROTO_V2 && | 1165 | if (priv->proto_version == ALPS_PROTO_V2 && |
| 1166 | (priv->flags & ALPS_DUALPOINT)) { | 1166 | (priv->flags & ALPS_DUALPOINT)) { |
| 1167 | /* On V2 devices the DualPoint Stick reports bare packets */ | 1167 | /* On V2 devices the DualPoint Stick reports bare packets */ |
| 1168 | dev = priv->dev2; | 1168 | dev = priv->dev2; |
| 1169 | dev2 = psmouse->dev; | ||
| 1169 | } else if (unlikely(IS_ERR_OR_NULL(priv->dev3))) { | 1170 | } else if (unlikely(IS_ERR_OR_NULL(priv->dev3))) { |
| 1170 | /* Register dev3 mouse if we received PS/2 packet first time */ | 1171 | /* Register dev3 mouse if we received PS/2 packet first time */ |
| 1171 | if (!IS_ERR(priv->dev3)) | 1172 | if (!IS_ERR(priv->dev3)) |
| @@ -1177,7 +1178,7 @@ static void alps_report_bare_ps2_packet(struct psmouse *psmouse, | |||
| 1177 | } | 1178 | } |
| 1178 | 1179 | ||
| 1179 | if (report_buttons) | 1180 | if (report_buttons) |
| 1180 | alps_report_buttons(dev, NULL, | 1181 | alps_report_buttons(dev, dev2, |
| 1181 | packet[0] & 1, packet[0] & 2, packet[0] & 4); | 1182 | packet[0] & 1, packet[0] & 2, packet[0] & 4); |
| 1182 | 1183 | ||
| 1183 | input_report_rel(dev, REL_X, | 1184 | input_report_rel(dev, REL_X, |
