HID: wacom: struct name cleanup
authorAaron Armstrong Skomra <aaron.skomra@wacom.com>
Tue, 25 Jul 2023 22:21:25 +0000 (15:21 -0700)
committerJiri Kosina <jkosina@suse.cz>
Mon, 14 Aug 2023 09:43:57 +0000 (11:43 +0200)
Help differentiate the two remote related "serial" struct variables by
renaming "wacom_remote_data" to "wacom_remote_work_data".

Signed-off-by: Aaron Skomra <skomra@gmail.com>
Signed-off-by: Aaron Armstrong Skomra <aaron.skomra@wacom.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_sys.c
drivers/hid/wacom_wac.c
drivers/hid/wacom_wac.h

index 16862f97c46c1e9c50a26d524bd9ee4f75a5bbde..3f704b8072e8a0904dc13de442552719e98d2c47 100644 (file)
@@ -1997,7 +1997,7 @@ static int wacom_initialize_remotes(struct wacom *wacom)
        spin_lock_init(&remote->remote_lock);
 
        error = kfifo_alloc(&remote->remote_fifo,
-                       5 * sizeof(struct wacom_remote_data),
+                       5 * sizeof(struct wacom_remote_work_data),
                        GFP_KERNEL);
        if (error) {
                hid_err(wacom->hdev, "failed allocating remote_fifo\n");
@@ -2660,17 +2660,18 @@ static void wacom_remote_work(struct work_struct *work)
        struct wacom *wacom = container_of(work, struct wacom, remote_work);
        struct wacom_remote *remote = wacom->remote;
        ktime_t kt = ktime_get();
-       struct wacom_remote_data data;
+       struct wacom_remote_work_data remote_work_data;
        unsigned long flags;
        unsigned int count;
-       u32 serial;
+       u32 work_serial;
        int i;
 
        spin_lock_irqsave(&remote->remote_lock, flags);
 
-       count = kfifo_out(&remote->remote_fifo, &data, sizeof(data));
+       count = kfifo_out(&remote->remote_fifo, &remote_work_data,
+                         sizeof(remote_work_data));
 
-       if (count != sizeof(data)) {
+       if (count != sizeof(remote_work_data)) {
                hid_err(wacom->hdev,
                        "workitem triggered without status available\n");
                spin_unlock_irqrestore(&remote->remote_lock, flags);
@@ -2683,14 +2684,14 @@ static void wacom_remote_work(struct work_struct *work)
        spin_unlock_irqrestore(&remote->remote_lock, flags);
 
        for (i = 0; i < WACOM_MAX_REMOTES; i++) {
-               serial = data.remote[i].serial;
-               if (serial) {
+               work_serial = remote_work_data.remote[i].serial;
+               if (work_serial) {
 
                        if (kt - remote->remotes[i].active_time > WACOM_REMOTE_BATTERY_TIMEOUT
                            && remote->remotes[i].active_time != 0)
                                wacom_remote_destroy_battery(wacom, i);
 
-                       if (remote->remotes[i].serial == serial) {
+                       if (remote->remotes[i].serial == work_serial) {
                                wacom_remote_attach_battery(wacom, i);
                                continue;
                        }
@@ -2698,7 +2699,7 @@ static void wacom_remote_work(struct work_struct *work)
                        if (remote->remotes[i].serial)
                                wacom_remote_destroy_one(wacom, i);
 
-                       wacom_remote_create_one(wacom, serial, i);
+                       wacom_remote_create_one(wacom, work_serial, i);
 
                } else if (remote->remotes[i].serial) {
                        wacom_remote_destroy_one(wacom, i);
index c922c1c4c78f09ba882d9cd6d1a5ad232f5b2a9d..471db78dbbf02d8d940fe6c69f595a7bb4e1f8bc 100644 (file)
@@ -1197,14 +1197,14 @@ static void wacom_remote_status_irq(struct wacom_wac *wacom_wac, size_t len)
        struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac);
        unsigned char *data = wacom_wac->data;
        struct wacom_remote *remote = wacom->remote;
-       struct wacom_remote_data remote_data;
+       struct wacom_remote_work_data remote_data;
        unsigned long flags;
        int i, ret;
 
        if (data[0] != WACOM_REPORT_DEVICE_LIST)
                return;
 
-       memset(&remote_data, 0, sizeof(struct wacom_remote_data));
+       memset(&remote_data, 0, sizeof(struct wacom_remote_work_data));
 
        for (i = 0; i < WACOM_MAX_REMOTES; i++) {
                int j = i * 6;
index a10b1966994737c31b3b327c9cbcb04934941ba1..57e185f18d53da281b9d7bec4748b4aafdf8c750 100644 (file)
@@ -328,7 +328,7 @@ struct hid_data {
        ktime_t time_delayed;
 };
 
-struct wacom_remote_data {
+struct wacom_remote_work_data {
        struct {
                u32 serial;
        } remote[WACOM_MAX_REMOTES];