linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] platform/x86: hp-wireless: reuse module_acpi_driver
@ 2017-04-19 19:27 Andy Shevchenko
  2017-04-19 20:15 ` Darren Hart
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2017-04-19 19:27 UTC (permalink / raw)
  To: Darren Hart, platform-driver-x86, linux-kernel; +Cc: Andy Shevchenko, Alex Hung

There is a macro to register and unregister modules in simple cases,
Let's use it and clean up the driver.

Cc: Alex Hung <alex.hung@canonical.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/platform/x86/hp-wireless.c | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/drivers/platform/x86/hp-wireless.c b/drivers/platform/x86/hp-wireless.c
index d860ea0d0e60..d6ea5e998fb8 100644
--- a/drivers/platform/x86/hp-wireless.c
+++ b/drivers/platform/x86/hp-wireless.c
@@ -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);
-- 
2.11.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v1] platform/x86: hp-wireless: reuse module_acpi_driver
  2017-04-19 19:27 [PATCH v1] platform/x86: hp-wireless: reuse module_acpi_driver Andy Shevchenko
@ 2017-04-19 20:15 ` Darren Hart
  0 siblings, 0 replies; 2+ messages in thread
From: Darren Hart @ 2017-04-19 20:15 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: platform-driver-x86, linux-kernel, Alex Hung

On Wed, Apr 19, 2017 at 10:27:31PM +0300, Andy Shevchenko wrote:
> There is a macro to register and unregister modules in simple cases,
> Let's use it and clean up the driver.
> 
> Cc: Alex Hung <alex.hung@canonical.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Thanks Andy,

Reviewed-by: Darren Hart (VMware) <dvhart@infradead.org>

-- 
Darren Hart
VMware Open Source Technology Center

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-19 20:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-19 19:27 [PATCH v1] platform/x86: hp-wireless: reuse module_acpi_driver Andy Shevchenko
2017-04-19 20:15 ` Darren Hart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).