Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1253324 > unrolled thread
| Started by | Muhammad Falak R Wani <falakreyaz@gmail.com> |
|---|---|
| First post | 2015-10-22 00:50 +0200 |
| Last post | 2015-10-22 09:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] scsi: wd719x: Use module_pci_driver Muhammad Falak R Wani <falakreyaz@gmail.com> - 2015-10-22 00:50 +0200
Re: [PATCH] scsi: wd719x: Use module_pci_driver Johannes Thumshirn <jthumshirn@suse.de> - 2015-10-22 09:30 +0200
| From | Muhammad Falak R Wani <falakreyaz@gmail.com> |
|---|---|
| Date | 2015-10-22 00:50 +0200 |
| Subject | [PATCH] scsi: wd719x: Use module_pci_driver |
| Message-ID | <qmamK-8tQ-11@gated-at.bofh.it> |
Remove boilerplate code by using macro module_pci_driver.
For drivers whose __init and __exit paths only register and
unregister to the pci API, it is preferred to use this macro.
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
---
drivers/scsi/wd719x.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/scsi/wd719x.c b/drivers/scsi/wd719x.c
index 2a9da2e..6d3bce3 100644
--- a/drivers/scsi/wd719x.c
+++ b/drivers/scsi/wd719x.c
@@ -976,18 +976,7 @@ static struct pci_driver wd719x_pci_driver = {
.remove = wd719x_pci_remove,
};
-static int __init wd719x_init(void)
-{
- return pci_register_driver(&wd719x_pci_driver);
-}
-
-static void __exit wd719x_exit(void)
-{
- pci_unregister_driver(&wd719x_pci_driver);
-}
-
-module_init(wd719x_init);
-module_exit(wd719x_exit);
+module_pci_driver(wd719x_pci_driver);
MODULE_DESCRIPTION("Western Digital WD7193/7197/7296 SCSI driver");
MODULE_AUTHOR("Ondrej Zary, Aaron Dewell, Juergen Gaertner");
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Johannes Thumshirn <jthumshirn@suse.de> |
|---|---|
| Date | 2015-10-22 09:30 +0200 |
| Message-ID | <qmitY-3Mm-9@gated-at.bofh.it> |
| In reply to | #1253324 |
On Thu, 2015-10-22 at 04:16 +0530, Muhammad Falak R Wani wrote:
> Remove boilerplate code by using macro module_pci_driver.
> For drivers whose __init and __exit paths only register and
> unregister to the pci API, it is preferred to use this macro.
>
> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
> ---
> drivers/scsi/wd719x.c | 13 +------------
> 1 file changed, 1 insertion(+), 12 deletions(-)
>
> diff --git a/drivers/scsi/wd719x.c b/drivers/scsi/wd719x.c
> index 2a9da2e..6d3bce3 100644
> --- a/drivers/scsi/wd719x.c
> +++ b/drivers/scsi/wd719x.c
> @@ -976,18 +976,7 @@ static struct pci_driver wd719x_pci_driver = {
> .remove = wd719x_pci_remove,
> };
>
> -static int __init wd719x_init(void)
> -{
> - return pci_register_driver(&wd719x_pci_driver);
> -}
> -
> -static void __exit wd719x_exit(void)
> -{
> - pci_unregister_driver(&wd719x_pci_driver);
> -}
> -
> -module_init(wd719x_init);
> -module_exit(wd719x_exit);
> +module_pci_driver(wd719x_pci_driver);
>
> MODULE_DESCRIPTION("Western Digital WD7193/7197/7296 SCSI driver");
> MODULE_AUTHOR("Ondrej Zary, Aaron Dewell, Juergen Gaertner");
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web