]> git.baikalelectronics.ru Git - kernel.git/commit
HID: multitouch: devm conversion
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Wed, 24 Jul 2013 17:38:05 +0000 (19:38 +0200)
committerJiri Kosina <jkosina@suse.cz>
Wed, 31 Jul 2013 08:13:15 +0000 (10:13 +0200)
commita869338cc788179b484f0f9fd1e329f570b5c045
treee4764c97f9a235688f9012787a6f8a24f5af1de0
parente691b982befc15fbf6847d1af0fe10df23dd7c24
HID: multitouch: devm conversion

HID special drivers can use safely the devres API.
Use it to remove 25 lines of code and to clean up a little the error paths.

Besides the basic kzalloc -> devm_kzalloc conversions, I changed the
place of the allocation of the new name. Doing this right in
mt_input_configured() removes the kstrdup call which was not very helpful
and the new way is simpler to understand (and to debug).

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-multitouch.c