]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: dgap: remove unneccessary dgap_init_pci() function
authorDaeseok Youn <daeseok.youn@gmail.com>
Fri, 4 Jul 2014 10:29:11 +0000 (19:29 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jul 2014 19:02:16 +0000 (12:02 -0700)
The dgap_init_pci() calls only pci_register_driver().
It doesn't need to make a function for that.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgap/dgap.c

index 5bccd14dd8ddbf8e30dfcace6606be6f70b97420..b193d20c7daf700a46d7c3b9da21a563e04af5fb 100644 (file)
@@ -74,7 +74,6 @@ static struct board_t *dgap_found_board(struct pci_dev *pdev, int id,
                                        int boardnum);
 static void dgap_cleanup_board(struct board_t *brd);
 static void dgap_poll_handler(ulong dummy);
-static int dgap_init_pci(void);
 static int dgap_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
 static void dgap_remove_one(struct pci_dev *dev);
 static int dgap_do_remap(struct board_t *brd);
@@ -479,7 +478,7 @@ static int dgap_init_module(void)
        if (rc)
                return rc;
 
-       rc = dgap_init_pci();
+       rc = pci_register_driver(&dgap_driver);
        if (rc)
                goto err_cleanup;
 
@@ -563,14 +562,6 @@ failed_class:
        return rc;
 }
 
-/*
- * Register pci driver, and return how many boards we have.
- */
-static int dgap_init_pci(void)
-{
-       return pci_register_driver(&dgap_driver);
-}
-
 static int dgap_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
        int rc;