* [PATCH -next] HID: intel-ish-hid: use module_pci_driver to simplify the code
@ 2016-08-21 15:28 Wei Yongjun
2016-08-26 19:00 ` Srinivas Pandruvada
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-08-21 15:28 UTC (permalink / raw)
To: Srinivas Pandruvada, Jiri Kosina, Benjamin Tissoires
Cc: Wei Yongjun, linux-input
From: Wei Yongjun <weiyongjun1@huawei.com>
Use the module_pci_driver() macro to make the code simpler
by eliminating module_init and module_exit calls.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/hid/intel-ish-hid/ipc/pci-ish.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/hid/intel-ish-hid/ipc/pci-ish.c b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
index b14d6f4..42f0bee 100644
--- a/drivers/hid/intel-ish-hid/ipc/pci-ish.c
+++ b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
@@ -311,18 +311,7 @@ static struct pci_driver ish_driver = {
.driver.pm = ISHTP_ISH_PM_OPS,
};
-static int __init ish_driver_init(void)
-{
- return pci_register_driver(&ish_driver);
-}
-
-static void __exit ish_driver_exit(void)
-{
- pci_unregister_driver(&ish_driver);
-}
-
-module_init(ish_driver_init);
-module_exit(ish_driver_exit);
+module_pci_driver(ish_driver);
/* Original author */
MODULE_AUTHOR("Daniel Drubin <daniel.drubin@intel.com>");
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] HID: intel-ish-hid: use module_pci_driver to simplify the code
2016-08-21 15:28 [PATCH -next] HID: intel-ish-hid: use module_pci_driver to simplify the code Wei Yongjun
@ 2016-08-26 19:00 ` Srinivas Pandruvada
0 siblings, 0 replies; 2+ messages in thread
From: Srinivas Pandruvada @ 2016-08-26 19:00 UTC (permalink / raw)
To: Wei Yongjun, Jiri Kosina, Benjamin Tissoires; +Cc: Wei Yongjun, linux-input
On Sun, 2016-08-21 at 15:28 +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Use the module_pci_driver() macro to make the code simpler
> by eliminating module_init and module_exit calls.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> ---
> drivers/hid/intel-ish-hid/ipc/pci-ish.c | 13 +------------
> 1 file changed, 1 insertion(+), 12 deletions(-)
>
> diff --git a/drivers/hid/intel-ish-hid/ipc/pci-ish.c
> b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
> index b14d6f4..42f0bee 100644
> --- a/drivers/hid/intel-ish-hid/ipc/pci-ish.c
> +++ b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
> @@ -311,18 +311,7 @@ static struct pci_driver ish_driver = {
> .driver.pm = ISHTP_ISH_PM_OPS,
> };
>
> -static int __init ish_driver_init(void)
> -{
> - return pci_register_driver(&ish_driver);
> -}
> -
> -static void __exit ish_driver_exit(void)
> -{
> - pci_unregister_driver(&ish_driver);
> -}
> -
> -module_init(ish_driver_init);
> -module_exit(ish_driver_exit);
> +module_pci_driver(ish_driver);
>
> /* Original author */
> MODULE_AUTHOR("Daniel Drubin <daniel.drubin@intel.com>");
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-26 19:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-21 15:28 [PATCH -next] HID: intel-ish-hid: use module_pci_driver to simplify the code Wei Yongjun
2016-08-26 19:00 ` Srinivas Pandruvada
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).