HID: wacom: Clean up use of struct->wacom_wac
authorTatsunosuke Tobita <tatsunosuke.tobita@wacom.com>
Thu, 1 Feb 2024 04:43:46 +0000 (13:43 +0900)
committerJiri Kosina <jkosina@suse.com>
Tue, 13 Feb 2024 10:41:35 +0000 (11:41 +0100)
Replace the indirect accesses to struct->wacom_wac from struct->wacom
to the direct access in order for better code reading.

Signed-off-by: Tatsunosuke Tobita <tatsunosuke.tobita@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/wacom_wac.c

index da8a01fedd3944a7588aad5e2a523b44b2b2797c..dc79527db5a94c9784be05ebd5bbf4724ce80d36 100644 (file)
@@ -2983,11 +2983,11 @@ void wacom_wac_report(struct hid_device *hdev, struct hid_report *report)
 
        wacom_wac_battery_pre_report(hdev, report);
 
-       if (pad_in_hid_field && wacom->wacom_wac.pad_input)
+       if (pad_in_hid_field && wacom_wac->pad_input)
                wacom_wac_pad_pre_report(hdev, report);
-       if (pen_in_hid_field && wacom->wacom_wac.pen_input)
+       if (pen_in_hid_field && wacom_wac->pen_input)
                wacom_wac_pen_pre_report(hdev, report);
-       if (finger_in_hid_field && wacom->wacom_wac.touch_input)
+       if (finger_in_hid_field && wacom_wac->touch_input)
                wacom_wac_finger_pre_report(hdev, report);
 
        for (r = 0; r < report->maxfield; r++) {
@@ -3003,7 +3003,7 @@ void wacom_wac_report(struct hid_device *hdev, struct hid_report *report)
 
        wacom_wac_battery_report(hdev, report);
 
-       if (true_pad && wacom->wacom_wac.pad_input)
+       if (true_pad && wacom_wac->pad_input)
                wacom_wac_pad_report(hdev, report, field);
 }