platform/x86: intel-hid: use devm_input_allocate_device() for HID events input device
authorMichał Kępień <kernel@kempniu.pl>
Fri, 24 Feb 2017 10:33:08 +0000 (11:33 +0100)
committerDarren Hart <dvhart@infradead.org>
Wed, 15 Mar 2017 05:57:11 +0000 (22:57 -0700)
commit175cc9b72fb5ca65dfb79e7c2500304476486717
tree85110439a3562d93d71bc9fb9e3ce882dbfdce01
parent99a75e7b05c764b82a1ba4b632c66d1b58b8fff7
platform/x86: intel-hid: use devm_input_allocate_device() for HID events input device

intel_hid_input_setup() is only called from the platform driver's .probe
callback.  Use the devm variant of input_allocate_device() for
allocating memory for the HID events input device in order to simplify
two error paths and get rid of intel_hid_input_destroy().

Signed-off-by: Michał Kępień <kernel@kempniu.pl>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-and-tested-by: Alex Hung <alex.hung@canonical.com>
drivers/platform/x86/intel-hid.c