Skip to content

Commit 7f02bb6

Browse files
Mazin RezkJiri Kosina
authored andcommitted
HID: logitech: Use HIDPP_RECEIVER_INDEX instead of 0xff
Some parts of hid-logitech-dj explicitly referred to 0xff for the receiver index. This patch changes those references to the HIDPP_RECEIVER_INDEX definition. Signed-off-by: Mazin Rezk <[email protected]> Reviewed-by: Filipe Laíns <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 1ee1369 commit 7f02bb6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/hid/hid-logitech-dj.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,7 @@ static int logi_dj_recv_query_paired_devices(struct dj_receiver_dev *djrcv_dev)
11531153
if (!dj_report)
11541154
return -ENOMEM;
11551155
dj_report->report_id = REPORT_ID_DJ_SHORT;
1156-
dj_report->device_index = 0xFF;
1156+
dj_report->device_index = HIDPP_RECEIVER_INDEX;
11571157
dj_report->report_type = REPORT_TYPE_CMD_GET_PAIRED_DEVICES;
11581158
retval = logi_dj_recv_send_report(djrcv_dev, dj_report);
11591159
kfree(dj_report);
@@ -1175,7 +1175,7 @@ static int logi_dj_recv_switch_to_dj_mode(struct dj_receiver_dev *djrcv_dev,
11751175

11761176
if (djrcv_dev->type == recvr_type_dj) {
11771177
dj_report->report_id = REPORT_ID_DJ_SHORT;
1178-
dj_report->device_index = 0xFF;
1178+
dj_report->device_index = HIDPP_RECEIVER_INDEX;
11791179
dj_report->report_type = REPORT_TYPE_CMD_SWITCH;
11801180
dj_report->report_params[CMD_SWITCH_PARAM_DEVBITFIELD] = 0x3F;
11811181
dj_report->report_params[CMD_SWITCH_PARAM_TIMEOUT_SECONDS] =
@@ -1204,7 +1204,7 @@ static int logi_dj_recv_switch_to_dj_mode(struct dj_receiver_dev *djrcv_dev,
12041204
memset(buf, 0, HIDPP_REPORT_SHORT_LENGTH);
12051205

12061206
buf[0] = REPORT_ID_HIDPP_SHORT;
1207-
buf[1] = 0xFF;
1207+
buf[1] = HIDPP_RECEIVER_INDEX;
12081208
buf[2] = 0x80;
12091209
buf[3] = 0x00;
12101210
buf[4] = 0x00;

0 commit comments

Comments
 (0)