HID: wacom - request tool info only when we get general events
Move wacom_intuos_schedule_prox_event inside wacom_intuos_general so we don't call it when general event data isn't ready. Signed-off-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
Родитель
c2848f2eef
Коммит
599b082095
|
@ -750,13 +750,6 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* don't report other events if we don't know the ID */
|
|
||||||
if (!wacom->id[idx]) {
|
|
||||||
/* but reschedule a read of the current tool */
|
|
||||||
wacom_intuos_schedule_prox_event(wacom);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -897,6 +890,13 @@ static int wacom_intuos_general(struct wacom_wac *wacom)
|
||||||
data[0] != WACOM_REPORT_INTUOS_PEN)
|
data[0] != WACOM_REPORT_INTUOS_PEN)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
/* don't report events if we don't know the tool ID */
|
||||||
|
if (!wacom->id[idx]) {
|
||||||
|
/* but reschedule a read of the current tool */
|
||||||
|
wacom_intuos_schedule_prox_event(wacom);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
x = (be16_to_cpup((__be16 *)&data[2]) << 1) | ((data[9] >> 1) & 1);
|
x = (be16_to_cpup((__be16 *)&data[2]) << 1) | ((data[9] >> 1) & 1);
|
||||||
y = (be16_to_cpup((__be16 *)&data[4]) << 1) | (data[9] & 1);
|
y = (be16_to_cpup((__be16 *)&data[4]) << 1) | (data[9] & 1);
|
||||||
distance = data[9] >> 2;
|
distance = data[9] >> 2;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче