diff mbox series

[2/2] HID: wacom: Clean up use of struct->wacom_wac

Message ID 20240201044346.23476-1-tatsunosuke.wacom@gmail.com (mailing list archive)
State Mainlined
Commit 1b8da9d81ee294acf24b3760314559f7a320c84f
Delegated to: Jiri Kosina
Headers show
Series [1/2] HID: wacom: generic: Avoid reporting a serial of '0' to userspace | expand

Commit Message

Tatsunosuke Tobita Feb. 1, 2024, 4:43 a.m. UTC
From: Tatsunosuke Tobita <tatsunosuke.tobita@wacom.com>

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>
---
 drivers/hid/wacom_wac.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Jiri Kosina Feb. 13, 2024, 10:42 a.m. UTC | #1
On Thu, 1 Feb 2024, Tobita, Tatsunosuke wrote:

> From: Tatsunosuke Tobita <tatsunosuke.tobita@wacom.com>
> 
> 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>

Applied to hid.git#for-6.9/wacom.

Thanks,
diff mbox series

Patch

diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index fbe10fbc5769..a44367aef621 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -2990,11 +2990,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++) {
@@ -3010,7 +3010,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);
 }