]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: intel-vbtn: Switch to use devm_input_allocate_device
authorAxel Lin <axel.lin@ingics.com>
Tue, 20 Sep 2016 09:01:24 +0000 (17:01 +0800)
committerDarren Hart <dvhart@linux.intel.com>
Tue, 13 Dec 2016 17:29:01 +0000 (09:29 -0800)
commit1b1e78b30b3fd30e5ef4997ff9b72dd4fe6e2fcf
treef58a43c7057eaff73da0d232c3cd4fa3da71318a
parent4a5c9daad80bb1d74e5108c28e87a9481c945370
platform/x86: intel-vbtn: Switch to use devm_input_allocate_device

Use devm_input_allocate_device to simplify the error handling code.
This conversion also makes input_register_device() to be called after
acpi_remove_notify_handler. This avoid a small window that it's possible
to call notify_handler after unregister input device.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/intel-vbtn.c