Skip to contentSkip to conversation

platform/x86: hp-wireless: reuse module_acpi_driver

PATCH In review Andy Shevchenko 2 participants 2 messages Apr 19, 2017 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/x86: hp-wireless: 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.

---
 drivers/platform/x86/hp-wireless.c | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)
drivers/platform/x86/hp-wireless.c +1 -18
index d860ea0d0e60..d6ea5e998fb8 100644
@@ -110,21 +110,4 @@ static struct acpi_driver hpwl_driver = {
 	},
 };
 
-static int __init hpwl_init(void)
-{
-	int err;
-
-	err = acpi_bus_register_driver(&hpwl_driver);
-	if (err)
-		pr_err("Unable to register HP wireless control driver.\n");
-
-	return err;
-}
-
-static void __exit hpwl_exit(void)
-{
-	acpi_bus_unregister_driver(&hpwl_driver);
-}
-
-module_init(hpwl_init);
-module_exit(hpwl_exit);
+module_acpi_driver(hpwl_driver);
Signature · 1 line
2.11.0