staging: dgnc: Remove unnecessary functions from dgnc_driver.c
This commit slightly cleans up the dgnc_driver.c file. The changes include removing one-line proxy functions as they were not needed. Additionaly the pci 'remove' function is deleted because it was no need for it. Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ea6e9dea2e
commit
bbecbacbed
|
@ -70,14 +70,9 @@ static void dgnc_init_globals(void);
|
||||||
static int dgnc_found_board(struct pci_dev *pdev, int id);
|
static int dgnc_found_board(struct pci_dev *pdev, int id);
|
||||||
static void dgnc_cleanup_board(struct dgnc_board *brd);
|
static void dgnc_cleanup_board(struct dgnc_board *brd);
|
||||||
static void dgnc_poll_handler(ulong dummy);
|
static void dgnc_poll_handler(ulong dummy);
|
||||||
static int dgnc_init_pci(void);
|
|
||||||
static int dgnc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
|
static int dgnc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
|
||||||
static void dgnc_remove_one(struct pci_dev *dev);
|
|
||||||
static int dgnc_probe1(struct pci_dev *pdev, int card_type);
|
|
||||||
static void dgnc_do_remap(struct dgnc_board *brd);
|
static void dgnc_do_remap(struct dgnc_board *brd);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* File operations permitted on Control/Management major.
|
* File operations permitted on Control/Management major.
|
||||||
*/
|
*/
|
||||||
|
@ -170,7 +165,6 @@ static struct pci_driver dgnc_driver = {
|
||||||
.name = "dgnc",
|
.name = "dgnc",
|
||||||
.probe = dgnc_init_one,
|
.probe = dgnc_init_one,
|
||||||
.id_table = dgnc_pci_tbl,
|
.id_table = dgnc_pci_tbl,
|
||||||
.remove = dgnc_remove_one,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -252,7 +246,7 @@ static int __init dgnc_init_module(void)
|
||||||
/*
|
/*
|
||||||
* Find and configure all the cards
|
* Find and configure all the cards
|
||||||
*/
|
*/
|
||||||
rc = dgnc_init_pci();
|
rc = pci_register_driver(&dgnc_driver);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If something went wrong in the scan, bail out of driver.
|
* If something went wrong in the scan, bail out of driver.
|
||||||
|
@ -346,15 +340,6 @@ static int dgnc_start(void)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Register pci driver, and return how many boards we have.
|
|
||||||
*/
|
|
||||||
static int dgnc_init_pci(void)
|
|
||||||
{
|
|
||||||
return pci_register_driver(&dgnc_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* returns count (>= 0), or negative on error */
|
/* returns count (>= 0), or negative on error */
|
||||||
static int dgnc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
static int dgnc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
{
|
{
|
||||||
|
@ -366,7 +351,7 @@ static int dgnc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
rc = -EIO;
|
rc = -EIO;
|
||||||
} else {
|
} else {
|
||||||
rc = dgnc_probe1(pdev, ent->driver_data);
|
rc = dgnc_found_board(pdev, ent->driver_data);
|
||||||
if (rc == 0) {
|
if (rc == 0) {
|
||||||
dgnc_NumBoards++;
|
dgnc_NumBoards++;
|
||||||
DPR_INIT(("Incrementing numboards to %d\n", dgnc_NumBoards));
|
DPR_INIT(("Incrementing numboards to %d\n", dgnc_NumBoards));
|
||||||
|
@ -375,17 +360,6 @@ static int dgnc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dgnc_probe1(struct pci_dev *pdev, int card_type)
|
|
||||||
{
|
|
||||||
return dgnc_found_board(pdev, card_type);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void dgnc_remove_one(struct pci_dev *dev)
|
|
||||||
{
|
|
||||||
/* Do Nothing */
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* dgnc_cleanup_board()
|
* dgnc_cleanup_board()
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue