Commit 8af6c08830b1ae114d1a8b548b1f8b056e068887
Committed by
Jiri Kosina
1 parent
a9dd22b730
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
Revert "HID: Fix logitech-dj: missing Unifying device issue"
This reverts commit 596264082f10dd4a567c43d4526b2f54ac5520bc. The reverted commit was a workaround needed when drivers became unable to communicate with devices during probe(). Now that such communication is possible, the workaround is not needed. Signed-off-by: Andrew de los Reyes <adlr@chromium.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Showing 2 changed files with 0 additions and 46 deletions Side-by-side Diff
drivers/hid/hid-logitech-dj.c
... | ... | @@ -193,7 +193,6 @@ |
193 | 193 | static int logi_dj_output_hidraw_report(struct hid_device *hid, u8 * buf, |
194 | 194 | size_t count, |
195 | 195 | unsigned char report_type); |
196 | -static int logi_dj_recv_query_paired_devices(struct dj_receiver_dev *djrcv_dev); | |
197 | 196 | |
198 | 197 | static void logi_dj_recv_destroy_djhid_device(struct dj_receiver_dev *djrcv_dev, |
199 | 198 | struct dj_report *dj_report) |
... | ... | @@ -234,7 +233,6 @@ |
234 | 233 | if (dj_report->report_params[DEVICE_PAIRED_PARAM_SPFUNCTION] & |
235 | 234 | SPFUNCTION_DEVICE_LIST_EMPTY) { |
236 | 235 | dbg_hid("%s: device list is empty\n", __func__); |
237 | - djrcv_dev->querying_devices = false; | |
238 | 236 | return; |
239 | 237 | } |
240 | 238 | |
... | ... | @@ -245,12 +243,6 @@ |
245 | 243 | return; |
246 | 244 | } |
247 | 245 | |
248 | - if (djrcv_dev->paired_dj_devices[dj_report->device_index]) { | |
249 | - /* The device is already known. No need to reallocate it. */ | |
250 | - dbg_hid("%s: device is already known\n", __func__); | |
251 | - return; | |
252 | - } | |
253 | - | |
254 | 246 | dj_hiddev = hid_allocate_device(); |
255 | 247 | if (IS_ERR(dj_hiddev)) { |
256 | 248 | dev_err(&djrcv_hdev->dev, "%s: hid_allocate_device failed\n", |
... | ... | @@ -314,7 +306,6 @@ |
314 | 306 | struct dj_report dj_report; |
315 | 307 | unsigned long flags; |
316 | 308 | int count; |
317 | - int retval; | |
318 | 309 | |
319 | 310 | dbg_hid("%s\n", __func__); |
320 | 311 | |
... | ... | @@ -347,25 +338,6 @@ |
347 | 338 | logi_dj_recv_destroy_djhid_device(djrcv_dev, &dj_report); |
348 | 339 | break; |
349 | 340 | default: |
350 | - /* A normal report (i. e. not belonging to a pair/unpair notification) | |
351 | - * arriving here, means that the report arrived but we did not have a | |
352 | - * paired dj_device associated to the report's device_index, this | |
353 | - * means that the original "device paired" notification corresponding | |
354 | - * to this dj_device never arrived to this driver. The reason is that | |
355 | - * hid-core discards all packets coming from a device while probe() is | |
356 | - * executing. */ | |
357 | - if (!djrcv_dev->paired_dj_devices[dj_report.device_index]) { | |
358 | - /* ok, we don't know the device, just re-ask the | |
359 | - * receiver for the list of connected devices. */ | |
360 | - retval = logi_dj_recv_query_paired_devices(djrcv_dev); | |
361 | - if (!retval) { | |
362 | - /* everything went fine, so just leave */ | |
363 | - break; | |
364 | - } | |
365 | - dev_err(&djrcv_dev->hdev->dev, | |
366 | - "%s:logi_dj_recv_query_paired_devices " | |
367 | - "error:%d\n", __func__, retval); | |
368 | - } | |
369 | 341 | dbg_hid("%s: unexpected report type\n", __func__); |
370 | 342 | } |
371 | 343 | } |
... | ... | @@ -396,12 +368,6 @@ |
396 | 368 | if (!djdev) { |
397 | 369 | dbg_hid("djrcv_dev->paired_dj_devices[dj_report->device_index]" |
398 | 370 | " is NULL, index %d\n", dj_report->device_index); |
399 | - kfifo_in(&djrcv_dev->notif_fifo, dj_report, sizeof(struct dj_report)); | |
400 | - | |
401 | - if (schedule_work(&djrcv_dev->work) == 0) { | |
402 | - dbg_hid("%s: did not schedule the work item, was already " | |
403 | - "queued\n", __func__); | |
404 | - } | |
405 | 371 | return; |
406 | 372 | } |
407 | 373 | |
... | ... | @@ -432,12 +398,6 @@ |
432 | 398 | if (dj_device == NULL) { |
433 | 399 | dbg_hid("djrcv_dev->paired_dj_devices[dj_report->device_index]" |
434 | 400 | " is NULL, index %d\n", dj_report->device_index); |
435 | - kfifo_in(&djrcv_dev->notif_fifo, dj_report, sizeof(struct dj_report)); | |
436 | - | |
437 | - if (schedule_work(&djrcv_dev->work) == 0) { | |
438 | - dbg_hid("%s: did not schedule the work item, was already " | |
439 | - "queued\n", __func__); | |
440 | - } | |
441 | 401 | return; |
442 | 402 | } |
443 | 403 | |
... | ... | @@ -479,10 +439,6 @@ |
479 | 439 | struct dj_report *dj_report; |
480 | 440 | int retval; |
481 | 441 | |
482 | - /* no need to protect djrcv_dev->querying_devices */ | |
483 | - if (djrcv_dev->querying_devices) | |
484 | - return 0; | |
485 | - | |
486 | 442 | dj_report = kzalloc(sizeof(struct dj_report), GFP_KERNEL); |
487 | 443 | if (!dj_report) |
488 | 444 | return -ENOMEM; |
... | ... | @@ -493,7 +449,6 @@ |
493 | 449 | kfree(dj_report); |
494 | 450 | return retval; |
495 | 451 | } |
496 | - | |
497 | 452 | |
498 | 453 | static int logi_dj_recv_switch_to_dj_mode(struct dj_receiver_dev *djrcv_dev, |
499 | 454 | unsigned timeout) |