Skip to content

Commit 55ab9b2

Browse files
skomraJiri Kosina
authored andcommitted
HID: wacom: struct name cleanup
Help differentiate the two remote related "serial" struct variables by renaming "wacom_remote_data" to "wacom_remote_work_data". 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 2834e38 commit 55ab9b2

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

drivers/hid/wacom_sys.c

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1997,7 +1997,7 @@ static int wacom_initialize_remotes(struct wacom *wacom)
19971997
spin_lock_init(&remote->remote_lock);
19981998

19991999
error = kfifo_alloc(&remote->remote_fifo,
2000-
5 * sizeof(struct wacom_remote_data),
2000+
5 * sizeof(struct wacom_remote_work_data),
20012001
GFP_KERNEL);
20022002
if (error) {
20032003
hid_err(wacom->hdev, "failed allocating remote_fifo\n");
@@ -2660,17 +2660,18 @@ static void wacom_remote_work(struct work_struct *work)
26602660
struct wacom *wacom = container_of(work, struct wacom, remote_work);
26612661
struct wacom_remote *remote = wacom->remote;
26622662
ktime_t kt = ktime_get();
2663-
struct wacom_remote_data data;
2663+
struct wacom_remote_work_data remote_work_data;
26642664
unsigned long flags;
26652665
unsigned int count;
2666-
u32 serial;
2666+
u32 work_serial;
26672667
int i;
26682668

26692669
spin_lock_irqsave(&remote->remote_lock, flags);
26702670

2671-
count = kfifo_out(&remote->remote_fifo, &data, sizeof(data));
2671+
count = kfifo_out(&remote->remote_fifo, &remote_work_data,
2672+
sizeof(remote_work_data));
26722673

2673-
if (count != sizeof(data)) {
2674+
if (count != sizeof(remote_work_data)) {
26742675
hid_err(wacom->hdev,
26752676
"workitem triggered without status available\n");
26762677
spin_unlock_irqrestore(&remote->remote_lock, flags);
@@ -2683,22 +2684,22 @@ static void wacom_remote_work(struct work_struct *work)
26832684
spin_unlock_irqrestore(&remote->remote_lock, flags);
26842685

26852686
for (i = 0; i < WACOM_MAX_REMOTES; i++) {
2686-
serial = data.remote[i].serial;
2687-
if (serial) {
2687+
work_serial = remote_work_data.remote[i].serial;
2688+
if (work_serial) {
26882689

26892690
if (kt - remote->remotes[i].active_time > WACOM_REMOTE_BATTERY_TIMEOUT
26902691
&& remote->remotes[i].active_time != 0)
26912692
wacom_remote_destroy_battery(wacom, i);
26922693

2693-
if (remote->remotes[i].serial == serial) {
2694+
if (remote->remotes[i].serial == work_serial) {
26942695
wacom_remote_attach_battery(wacom, i);
26952696
continue;
26962697
}
26972698

26982699
if (remote->remotes[i].serial)
26992700
wacom_remote_destroy_one(wacom, i);
27002701

2701-
wacom_remote_create_one(wacom, serial, i);
2702+
wacom_remote_create_one(wacom, work_serial, i);
27022703

27032704
} else if (remote->remotes[i].serial) {
27042705
wacom_remote_destroy_one(wacom, i);

drivers/hid/wacom_wac.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,14 +1197,14 @@ static void wacom_remote_status_irq(struct wacom_wac *wacom_wac, size_t len)
11971197
struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac);
11981198
unsigned char *data = wacom_wac->data;
11991199
struct wacom_remote *remote = wacom->remote;
1200-
struct wacom_remote_data remote_data;
1200+
struct wacom_remote_work_data remote_data;
12011201
unsigned long flags;
12021202
int i, ret;
12031203

12041204
if (data[0] != WACOM_REPORT_DEVICE_LIST)
12051205
return;
12061206

1207-
memset(&remote_data, 0, sizeof(struct wacom_remote_data));
1207+
memset(&remote_data, 0, sizeof(struct wacom_remote_work_data));
12081208

12091209
for (i = 0; i < WACOM_MAX_REMOTES; i++) {
12101210
int j = i * 6;

drivers/hid/wacom_wac.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ struct hid_data {
328328
ktime_t time_delayed;
329329
};
330330

331-
struct wacom_remote_data {
331+
struct wacom_remote_work_data {
332332
struct {
333333
u32 serial;
334334
} remote[WACOM_MAX_REMOTES];

0 commit comments

Comments
 (0)