Skip to content

Commit 2834e38

Browse files
skomraJiri Kosina
authored andcommitted
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: Aaron Skomra <[email protected]> Signed-off-by: Aaron Armstrong Skomra <[email protected]> Reviewed-by: Jason Gerecke <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 9ac6678 commit 2834e38

File tree

3 files changed

+1
-4
lines changed

3 files changed

+1
-4
lines changed

drivers/hid/wacom_sys.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2684,7 +2684,7 @@ static void wacom_remote_work(struct work_struct *work)
26842684

26852685
for (i = 0; i < WACOM_MAX_REMOTES; i++) {
26862686
serial = data.remote[i].serial;
2687-
if (data.remote[i].connected) {
2687+
if (serial) {
26882688

26892689
if (kt - remote->remotes[i].active_time > WACOM_REMOTE_BATTERY_TIMEOUT
26902690
&& remote->remotes[i].active_time != 0)

drivers/hid/wacom_wac.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,10 +1209,8 @@ static void wacom_remote_status_irq(struct wacom_wac *wacom_wac, size_t len)
12091209
for (i = 0; i < WACOM_MAX_REMOTES; i++) {
12101210
int j = i * 6;
12111211
int serial = (data[j+6] << 16) + (data[j+5] << 8) + data[j+4];
1212-
bool connected = data[j+2];
12131212

12141213
remote_data.remote[i].serial = serial;
1215-
remote_data.remote[i].connected = connected;
12161214
}
12171215

12181216
spin_lock_irqsave(&remote->remote_lock, flags);

drivers/hid/wacom_wac.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,6 @@ struct hid_data {
331331
struct wacom_remote_data {
332332
struct {
333333
u32 serial;
334-
bool connected;
335334
} remote[WACOM_MAX_REMOTES];
336335
};
337336

0 commit comments

Comments
 (0)