2015-07-08 05:54:34

by Rajat Jain

[permalink] [raw]
Subject: [PATCH] mtd: denali: Use module_pci_driver()

Use module_pci_driver, since init and exit functions only register
and unregister the pci driver, respectively.

Signed-off-by: Rajat Jain <[email protected]>
Signed-off-by: Rajat Jain <[email protected]>
---
drivers/mtd/nand/denali_pci.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/mtd/nand/denali_pci.c b/drivers/mtd/nand/denali_pci.c
index 6e2f387..29e5d0c 100644
--- a/drivers/mtd/nand/denali_pci.c
+++ b/drivers/mtd/nand/denali_pci.c
@@ -129,14 +129,4 @@ static struct pci_driver denali_pci_driver = {
.remove = denali_pci_remove,
};

-static int denali_init_pci(void)
-{
- return pci_register_driver(&denali_pci_driver);
-}
-module_init(denali_init_pci);
-
-static void denali_exit_pci(void)
-{
- pci_unregister_driver(&denali_pci_driver);
-}
-module_exit(denali_exit_pci);
+module_pci_driver(denali_pci_driver);
--
2.4.3.573.g4eafbef


2015-08-19 00:29:59

by Brian Norris

[permalink] [raw]
Subject: Re: [PATCH] mtd: denali: Use module_pci_driver()

On Tue, Jul 07, 2015 at 10:54:03PM -0700, Rajat Jain wrote:
> Use module_pci_driver, since init and exit functions only register
> and unregister the pci driver, respectively.
>
> Signed-off-by: Rajat Jain <[email protected]>
> Signed-off-by: Rajat Jain <[email protected]>

I pushed an identical patch to l2-mtd.git from another author. Didn't
notice yours until now. Thanks anyway!

Brian