From: Aaron Erhardt <aer@tuxedocomputers.com>
To: "Werner Sembach" <wse@tuxedocomputers.com>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Aaron Erhardt <aer@tuxedocomputers.com>,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v4 1/6] platform/x86/tuxedo: Don't use device driver data
Date: Mon, 28 Sep 2026 10:36:26 +0200 [thread overview]
Message-ID: <20260928085448.9024-2-aer@tuxedocomputers.com> (raw)
In-Reply-To: <20260928085448.9024-1-aer@tuxedocomputers.com>
The WMI driver for TUXEDO Sirius devices used to rely on the device
driver data through dev_set_drvdata even though it is only a virtual
low level HID driver. For this purpose, it is better to use the
driver_data of the hid_device struct to avoid interfering with high
level device drivers.
Signed-off-by: Aaron Erhardt <aer@tuxedocomputers.com>
---
drivers/platform/x86/tuxedo/nb04/wmi_ab.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/platform/x86/tuxedo/nb04/wmi_ab.c b/drivers/platform/x86/tuxedo/nb04/wmi_ab.c
index 32d7756022c2..72205de72256 100644
--- a/drivers/platform/x86/tuxedo/nb04/wmi_ab.c
+++ b/drivers/platform/x86/tuxedo/nb04/wmi_ab.c
@@ -448,7 +448,7 @@ static int tux_ll_start(struct hid_device *hdev)
}
driver_data->next_lamp_id = 0;
- dev_set_drvdata(&hdev->dev, driver_data);
+ hdev->driver_data = driver_data;
return ret;
}
@@ -485,7 +485,7 @@ struct __packed lamp_array_attributes_report_t {
static int handle_lamp_array_attributes_report(struct hid_device *hdev,
struct lamp_array_attributes_report_t *rep)
{
- struct tux_hdev_driver_data_t *driver_data = dev_get_drvdata(&hdev->dev);
+ struct tux_hdev_driver_data_t *driver_data = hdev->driver_data;
rep->lamp_count = driver_data->lamp_count;
rep->bounding_box_width_in_micrometers = 368000;
@@ -510,7 +510,7 @@ struct __packed lamp_attributes_request_report_t {
static int handle_lamp_attributes_request_report(struct hid_device *hdev,
struct lamp_attributes_request_report_t *rep)
{
- struct tux_hdev_driver_data_t *driver_data = dev_get_drvdata(&hdev->dev);
+ struct tux_hdev_driver_data_t *driver_data = hdev->driver_data;
if (rep->lamp_id < driver_data->lamp_count)
driver_data->next_lamp_id = rep->lamp_id;
@@ -539,7 +539,7 @@ struct __packed lamp_attributes_response_report_t {
static int handle_lamp_attributes_response_report(struct hid_device *hdev,
struct lamp_attributes_response_report_t *rep)
{
- struct tux_hdev_driver_data_t *driver_data = dev_get_drvdata(&hdev->dev);
+ struct tux_hdev_driver_data_t *driver_data = hdev->driver_data;
u16 lamp_id = driver_data->next_lamp_id;
rep->lamp_id = lamp_id;
@@ -598,7 +598,7 @@ struct __packed lamp_multi_update_report_t {
static int handle_lamp_multi_update_report(struct hid_device *hdev,
struct lamp_multi_update_report_t *rep)
{
- struct tux_hdev_driver_data_t *driver_data = dev_get_drvdata(&hdev->dev);
+ struct tux_hdev_driver_data_t *driver_data = hdev->driver_data;
union tux_wmi_xx_496in_80out_in_t *next = &driver_data->next_kbl_set_multiple_keys_in;
struct tux_kbl_set_multiple_keys_in_rgb_config_t *rgb_configs_j;
struct wmi_device *wdev = to_wmi_device(hdev->dev.parent);
@@ -683,7 +683,7 @@ struct __packed lamp_range_update_report_t {
static int handle_lamp_range_update_report(struct hid_device *hdev,
struct lamp_range_update_report_t *rep)
{
- struct tux_hdev_driver_data_t *driver_data = dev_get_drvdata(&hdev->dev);
+ struct tux_hdev_driver_data_t *driver_data = hdev->driver_data;
struct lamp_multi_update_report_t lamp_multi_update_report = {
.report_id = LAMP_MULTI_UPDATE_REPORT_ID,
};
--
2.43.0
next prev parent reply other threads:[~2026-09-28 8:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 8:36 [PATCH v4 0/6] platform/x86/tuxedo: Fixes for TUXEDO NB04 driver Aaron Erhardt
2026-09-28 8:36 ` Aaron Erhardt [this message]
2026-09-28 8:36 ` [PATCH v4 2/6] platform/x86/tuxedo: Set HID report ID on success Aaron Erhardt
2026-09-28 8:36 ` [PATCH v4 3/6] platform/x86/tuxedo: Use intensity according to HID spec Aaron Erhardt
2026-09-28 8:36 ` [PATCH v4 4/6] platform/x86/tuxedo: Fix keyboard LED map ordering Aaron Erhardt
2026-10-05 14:06 ` Ilpo Järvinen
2026-10-06 7:41 ` Aaron Erhardt
2026-09-28 8:36 ` [PATCH v4 5/6] platform/x86/tuxedo: Update and extend documentation Aaron Erhardt
2026-09-28 8:36 ` [PATCH v4 6/6] MAINTAINERS: Add Aaron Erhardt as maintainer of TUXEDO DRIVERS Aaron Erhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260928085448.9024-2-aer@tuxedocomputers.com \
--to=aer@tuxedocomputers.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=wse@tuxedocomputers.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.