HID: hidraw: put old deallocation mechanism in place
authorJiri Kosina <jkosina@suse.cz>
Thu, 1 Nov 2012 10:33:26 +0000 (11:33 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 26 Oct 2013 20:05:57 +0000 (21:05 +0100)
commitc3ffb34128a34e3b58332b0fb98e8311f5c0ba08
treefdacbb12936bcc074ce191b4942c624d07dd6032
parent8f9b44910e7456fd898fe5da1f45e2d463cbfb31
HID: hidraw: put old deallocation mechanism in place

commit df0cfd6990347c20ae031f3f34137cba274f1972 upstream.

This basically reverts commit 4fe9f8e203fda. It causes multiple problems,
namely:

- after rmmod/modprobe cycle of bus driver, the input is not claimed any
  more. This is likely because of misplaced hid_hw_close()
- it causes memory corruption on hidraw_list

As original patch author is not responding to requests to fix his patch,
and the original deallocation mechanism is not exposing any problems, I
am reverting back to it.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/hid/hidraw.c