Commit 2834e380 authored by Aaron Armstrong Skomra's avatar Aaron Armstrong Skomra Committed by Jiri Kosina

HID: wacom: remove unnecessary 'connected' variable from EKR

The 'connected' variable was poorly named, and this has led to some
confusion. We can get the same information by checking if a serial number
exists in the specified EKR slot.
Signed-off-by: default avatarAaron Skomra <skomra@gmail.com>
Signed-off-by: default avatarAaron Armstrong Skomra <aaron.skomra@wacom.com>
Reviewed-by: default avatarJason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 9ac6678b
......@@ -2684,7 +2684,7 @@ static void wacom_remote_work(struct work_struct *work)
for (i = 0; i < WACOM_MAX_REMOTES; i++) {
serial = data.remote[i].serial;
if (data.remote[i].connected) {
if (serial) {
if (kt - remote->remotes[i].active_time > WACOM_REMOTE_BATTERY_TIMEOUT
&& remote->remotes[i].active_time != 0)
......
......@@ -1209,10 +1209,8 @@ static void wacom_remote_status_irq(struct wacom_wac *wacom_wac, size_t len)
for (i = 0; i < WACOM_MAX_REMOTES; i++) {
int j = i * 6;
int serial = (data[j+6] << 16) + (data[j+5] << 8) + data[j+4];
bool connected = data[j+2];
remote_data.remote[i].serial = serial;
remote_data.remote[i].connected = connected;
}
spin_lock_irqsave(&remote->remote_lock, flags);
......
......@@ -331,7 +331,6 @@ struct hid_data {
struct wacom_remote_data {
struct {
u32 serial;
bool connected;
} remote[WACOM_MAX_REMOTES];
};
......
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