aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/drivers/addi_apci_1500.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-03-05 09:53:41 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-11 10:01:44 -0700
commitb8f4ac237e382accd4b30c75043939f7ed9e79a6 (patch)
treeab79110ef3360986267feb45ab155cdc3356f08c /drivers/staging/comedi/drivers/addi_apci_1500.c
parentstaging: sw_sync: sw_sync_timeline_ops can be static (diff)
downloadlinux-dev-b8f4ac237e382accd4b30c75043939f7ed9e79a6.tar.xz
linux-dev-b8f4ac237e382accd4b30c75043939f7ed9e79a6.zip
staging: comedi: comedi_pci: change the comedi_pci_auto_config() 'context'
The comedi_pci_auto_config() function is used to allow the PCI driver (*probe) function to automatically call the comedi driver (*auto_attach). This allows the comedi driver to be part of the PnP process when the PCI device is detected. Currently the comedi_pci_auto_config() always passes a 'context' of '0' to comedi_auto_config(). This makes the 'context' a bit useless. Modify comedi_pci_auto_config() to allow the comedi pci drivers to pass a 'context' from the PCI driver. Make all the comedi pci drivers pass the pci_device_id 'driver_data' as the 'context'. Since none of the comedi pci drivers currently set the 'driver_data' the 'context' will still be '0'. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers/addi_apci_1500.c')
-rw-r--r--drivers/staging/comedi/drivers/addi_apci_1500.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/comedi/drivers/addi_apci_1500.c b/drivers/staging/comedi/drivers/addi_apci_1500.c
index 9c2f8eeb7977..c945a2aef9e3 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1500.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1500.c
@@ -50,9 +50,9 @@ static struct comedi_driver apci1500_driver = {
};
static int apci1500_pci_probe(struct pci_dev *dev,
- const struct pci_device_id *ent)
+ const struct pci_device_id *id)
{
- return comedi_pci_auto_config(dev, &apci1500_driver);
+ return comedi_pci_auto_config(dev, &apci1500_driver, id->driver_data);
}
static DEFINE_PCI_DEVICE_TABLE(apci1500_pci_table) = {