diff options
author | Michał Kępień <kernel@kempniu.pl> | 2017-03-09 15:11:50 +0300 |
---|---|---|
committer | Darren Hart <dvhart@infradead.org> | 2017-03-15 08:58:11 +0300 |
commit | db8f95d0141926a673484d228cd4040f5b10972f (patch) | |
tree | 5033e171f1162ea08946e11f70661e0587d9c394 /drivers/platform | |
parent | c6d973f474cfdc4d9f0f18b7f539c5cc7847188d (diff) | |
download | linux-db8f95d0141926a673484d228cd4040f5b10972f.tar.xz |
platform/x86: toshiba_acpi: remove sparse_keymap_free() calls
As sparse_keymap_setup() now uses a managed memory allocation for the
keymap copy it creates, the latter is freed automatically. Remove all
calls to sparse_keymap_free().
Signed-off-by: Michał Kępień <kernel@kempniu.pl>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/toshiba_acpi.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index 074bf2fa1c55..d0daf75cbed1 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c @@ -2849,7 +2849,7 @@ static int toshiba_acpi_setup_keyboard(struct toshiba_acpi_dev *dev) error = i8042_install_filter(toshiba_acpi_i8042_filter); if (error) { pr_err("Error installing key filter\n"); - goto err_free_keymap; + goto err_free_dev; } dev->ntfy_supported = 1; @@ -2880,8 +2880,6 @@ static int toshiba_acpi_setup_keyboard(struct toshiba_acpi_dev *dev) err_remove_filter: if (dev->ntfy_supported) i8042_remove_filter(toshiba_acpi_i8042_filter); - err_free_keymap: - sparse_keymap_free(dev->hotkey_dev); err_free_dev: input_free_device(dev->hotkey_dev); dev->hotkey_dev = NULL; @@ -3018,10 +3016,8 @@ static int toshiba_acpi_remove(struct acpi_device *acpi_dev) cancel_work_sync(&dev->hotkey_work); } - if (dev->hotkey_dev) { + if (dev->hotkey_dev) input_unregister_device(dev->hotkey_dev); - sparse_keymap_free(dev->hotkey_dev); - } backlight_device_unregister(dev->backlight_dev); |