From: Aaron Erhardt <aer@tuxedocomputers.com>
To: wse@tuxedocomputers.com, hansg@kernel.org, ilpo.jarvinen@linux.intel.com
Cc: Aaron Erhardt <aer@tuxedocomputers.com>,
linux-kernel@vger.kernel.org,
platform-driver-x86@vger.kernel.org
Subject: [PATCH 1/6] platform/x86/tuxedo: Don't use device driver data
Date: Tue, 28 Jul 2026 13:59:16 +0200 [thread overview]
Message-ID: <20260728115918.125349-2-aer@tuxedocomputers.com> (raw)
In-Reply-To: <20260728115918.125349-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-07-28 11:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 11:59 [PATCH 0/6] platform/x86/tuxedo: Fixes for TUXEDO NB04 driver Aaron Erhardt
2026-07-28 11:59 ` Aaron Erhardt [this message]
2026-07-28 11:59 ` [PATCH 2/6] platform/x86/tuxedo: Set HID report ID on success Aaron Erhardt
2026-07-28 11:59 ` [PATCH 3/6] platform/x86/tuxedo: Use intensity according to HID spec Aaron Erhardt
2026-08-24 15:13 ` Ilpo Järvinen
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=20260728115918.125349-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox