diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2019-04-20 13:21:44 +0200 |
---|---|---|
committer | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2019-04-23 17:59:34 +0200 |
commit | 7bb56a5f3809ef47ac4911d561c86725514c4354 (patch) | |
tree | 5cd7e2bf4762c807d91fa376d84020e56a1ff835 /drivers/hid/hid-logitech-dj.c | |
parent | 83898234f2ae73fecc3d9dda2c3e708bee46d7e8 (diff) | |
download | linux-stable-7bb56a5f3809ef47ac4911d561c86725514c4354.tar.gz linux-stable-7bb56a5f3809ef47ac4911d561c86725514c4354.tar.bz2 linux-stable-7bb56a5f3809ef47ac4911d561c86725514c4354.zip |
HID: logitech-dj: fix variable naming in logi_dj_hidpp_event
we are not dealing with a dj_report but a hidpp_event.
We don't need all of the struct description in this function, but having
the variable named `dj_report` feels weird.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Diffstat (limited to 'drivers/hid/hid-logitech-dj.c')
-rw-r--r-- | drivers/hid/hid-logitech-dj.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c index f2e994d11b70..6408ef13e909 100644 --- a/drivers/hid/hid-logitech-dj.c +++ b/drivers/hid/hid-logitech-dj.c @@ -108,6 +108,13 @@ struct dj_report { u8 report_params[DJREPORT_SHORT_LENGTH - 3]; }; +struct hidpp_event { + u8 report_id; + u8 device_index; + u8 sub_id; + u8 params[HIDPP_REPORT_LONG_LENGTH - 3U]; +} __packed; + struct dj_receiver_dev { struct hid_device *hdev; struct dj_device *paired_dj_devices[DJ_MAX_PAIRED_DEVICES + @@ -907,9 +914,9 @@ static int logi_dj_hidpp_event(struct hid_device *hdev, int size) { struct dj_receiver_dev *djrcv_dev = hid_get_drvdata(hdev); - struct dj_report *dj_report = (struct dj_report *) data; + struct hidpp_event *hidpp_report = (struct hidpp_event *) data; unsigned long flags; - u8 device_index = dj_report->device_index; + u8 device_index = hidpp_report->device_index; if (device_index == HIDPP_RECEIVER_INDEX) { /* special case were the device wants to know its unifying @@ -938,7 +945,7 @@ static int logi_dj_hidpp_event(struct hid_device *hdev, * so ignore those reports too. */ dev_err(&hdev->dev, "%s: invalid device index:%d\n", - __func__, dj_report->device_index); + __func__, hidpp_report->device_index); return false; } |