[2/7] HID: wacom: remove unused hid_data::pressure

Message ID 20240201115320.684-3-jirislaby@kernel.org
State New
Headers
Series HID: unused struct members cleanup |

Commit Message

Jiri Slaby Feb. 1, 2024, 11:53 a.m. UTC
  The pressure member in struct hid_data is unused. It was
added in commit 5ae6e89f7409 (HID: wacom: implement the finger part of
the HID generic handling), but never used.

As this is not a struct to communicate with the HW, remove that member.

Found by https://github.com/jirislaby/clang-struct.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Cc: Ping Cheng <ping.cheng@wacom.com>
Cc: Jason Gerecke <jason.gerecke@wacom.com>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
 drivers/hid/wacom_wac.h | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Ping Cheng Feb. 2, 2024, 2:30 a.m. UTC | #1
On Thu, Feb 1, 2024 at 3:53 AM Jiri Slaby (SUSE) <jirislaby@kernel.org> wrote:
>
> The pressure member in struct hid_data is unused. It was
> added in commit 5ae6e89f7409 (HID: wacom: implement the finger part of
> the HID generic handling), but never used.
>
> As this is not a struct to communicate with the HW, remove that member.
>
> Found by https://github.com/jirislaby/clang-struct.
>
> Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>

Wacom current touch devices do not support pressure. We could add pressure
back when it is necessary in the future. Thank you Jiri.

Acked-by: Ping Cheng <ping.cheng@wacom.com>

Cheers,
Ping

> Cc: Ping Cheng <ping.cheng@wacom.com>
> Cc: Jason Gerecke <jason.gerecke@wacom.com>
> Cc: Jiri Kosina <jikos@kernel.org>
> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> ---
>  drivers/hid/wacom_wac.h | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/hid/wacom_wac.h b/drivers/hid/wacom_wac.h
> index e63b1e806e34..6ec499841f70 100644
> --- a/drivers/hid/wacom_wac.h
> +++ b/drivers/hid/wacom_wac.h
> @@ -309,7 +309,6 @@ struct hid_data {
>         bool confidence;
>         int x;
>         int y;
> -       int pressure;
>         int width;
>         int height;
>         int id;
> --
> 2.43.0
>
>
  

Patch

diff --git a/drivers/hid/wacom_wac.h b/drivers/hid/wacom_wac.h
index e63b1e806e34..6ec499841f70 100644
--- a/drivers/hid/wacom_wac.h
+++ b/drivers/hid/wacom_wac.h
@@ -309,7 +309,6 @@  struct hid_data {
 	bool confidence;
 	int x;
 	int y;
-	int pressure;
 	int width;
 	int height;
 	int id;