# Re: \[PATCH 1/1\] HID: add have\_special\_driver hid module parameter

- From: Nikolai Kondrashov \<hidden\>
- Date: 2012-04-08 10:48:11 
- List: linux-input
- Page: https://ratatoskr.run/linux-input/2012/04/8919259
- Thread: https://ratatoskr.run/linux-input/2012/02/8918893/t.md

```text
Hi Jiri,

On 04/03/2012 02:41 AM, Jiri Kosina wrote:
> On Sun, 1 Apr 2012, Nikolai Kondrashov wrote:
>
>>> I will be travelling for the whole day tomorrow, so I will look into this
>>> onboard the airplane and will try to come up with a fix.
>>
>> Great! Thank you :)!
>
> Please let me know whether the patch below fixes the rebinding for your
> drivers that replace the report descriptor. I believe it should. Thanks in
> advance for testing.

On a closer look, it seems simply freeing rdesc is far from enough. There
are lots of fields in the hid_device structure which describe the reports
and which are filled during report parsing. Namely: collection,
collection_size, maxcollection, maxapplication, report_enum, and likely
others. Parsing a new descriptor over the values of these variables,
corresponding to the previous descriptor, doesn't produce a meaningful
result.

These fields should be reset and linked data freed before a new report
descriptor could be parsed.

Sincerely,
Nick
```
