diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2013-08-28 15:48:41 +0400 |
---|---|---|
committer | Matthew Garrett <matthew.garrett@nebula.com> | 2013-09-05 16:52:46 +0400 |
commit | 5c07eae979dfb596141c6885e5f5ecf1cd22cad3 (patch) | |
tree | 08596268dee42c8f73b034b5748fcf54ab562853 /drivers/platform/x86/panasonic-laptop.c | |
parent | 5ff67df324e8440405e620bc05ea0600f07a8a27 (diff) | |
download | linux-5c07eae979dfb596141c6885e5f5ecf1cd22cad3.tar.xz |
platform/x86: panasonic-laptop: reuse module_acpi_driver
There is a macro to register and unregister modules in simple cases, Let's use
it and clean up the driver.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Diffstat (limited to 'drivers/platform/x86/panasonic-laptop.c')
-rw-r--r-- | drivers/platform/x86/panasonic-laptop.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c index 984253da365d..10d12b221601 100644 --- a/drivers/platform/x86/panasonic-laptop.c +++ b/drivers/platform/x86/panasonic-laptop.c @@ -643,23 +643,6 @@ out_hotkey: return result; } -static int __init acpi_pcc_init(void) -{ - int result = 0; - - if (acpi_disabled) - return -ENODEV; - - result = acpi_bus_register_driver(&acpi_pcc_driver); - if (result < 0) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "Error registering hotkey driver\n")); - return -ENODEV; - } - - return 0; -} - static int acpi_pcc_hotkey_remove(struct acpi_device *device) { struct pcc_acpi *pcc = acpi_driver_data(device); @@ -679,10 +662,4 @@ static int acpi_pcc_hotkey_remove(struct acpi_device *device) return 0; } -static void __exit acpi_pcc_exit(void) -{ - acpi_bus_unregister_driver(&acpi_pcc_driver); -} - -module_init(acpi_pcc_init); -module_exit(acpi_pcc_exit); +module_acpi_driver(acpi_pcc_driver); |