aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/drivers/addi_apci_3501.c
diff options
context:
space:
mode:
authorPeter Huewe <peterhuewe@gmx.de>2013-01-22 23:40:03 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-25 12:13:06 -0800
commit9901a4d75d007686e8f6473189cafc4b216b7449 (patch)
tree72c2c8d10a37f53ce088dbb67f3cabf303a019b2 /drivers/staging/comedi/drivers/addi_apci_3501.c
parentstaging/comedi: Move comedi_pci_auto_unconfig to drivers.c (diff)
downloadlinux-dev-9901a4d75d007686e8f6473189cafc4b216b7449.tar.xz
linux-dev-9901a4d75d007686e8f6473189cafc4b216b7449.zip
staging/comedi: Use comedi_pci_auto_unconfig directly for pci_driver.remove
(Almost) all comedi pci drivers have some wrapper for their pci_driver.remove function which simply calls comedi_pci_auto_unconfig which has the same function prototype as the wrapper. -> we can remove these wrappers and call comedi_pci_auto_unconfig directly. This removes a lot some boilerplate code and saves some bytes. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers/addi_apci_3501.c')
-rw-r--r--drivers/staging/comedi/drivers/addi_apci_3501.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/staging/comedi/drivers/addi_apci_3501.c b/drivers/staging/comedi/drivers/addi_apci_3501.c
index 0fdcbe2d5b69..8920b96ab212 100644
--- a/drivers/staging/comedi/drivers/addi_apci_3501.c
+++ b/drivers/staging/comedi/drivers/addi_apci_3501.c
@@ -444,11 +444,6 @@ static int apci3501_pci_probe(struct pci_dev *dev,
return comedi_pci_auto_config(dev, &apci3501_driver);
}
-static void apci3501_pci_remove(struct pci_dev *dev)
-{
- comedi_pci_auto_unconfig(dev);
-}
-
static DEFINE_PCI_DEVICE_TABLE(apci3501_pci_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3001) },
{ 0 }
@@ -459,7 +454,7 @@ static struct pci_driver apci3501_pci_driver = {
.name = "addi_apci_3501",
.id_table = apci3501_pci_table,
.probe = apci3501_pci_probe,
- .remove = apci3501_pci_remove,
+ .remove = comedi_pci_auto_unconfig,
};
module_comedi_pci_driver(apci3501_driver, apci3501_pci_driver);