From b8f4ac237e382accd4b30c75043939f7ed9e79a6 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Tue, 5 Mar 2013 09:53:41 -0700 Subject: 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 Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci7x3x.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/staging/comedi/drivers/adl_pci7x3x.c') diff --git a/drivers/staging/comedi/drivers/adl_pci7x3x.c b/drivers/staging/comedi/drivers/adl_pci7x3x.c index f27f48e6e702..b8dd161136aa 100644 --- a/drivers/staging/comedi/drivers/adl_pci7x3x.c +++ b/drivers/staging/comedi/drivers/adl_pci7x3x.c @@ -293,9 +293,10 @@ static struct comedi_driver adl_pci7x3x_driver = { }; static int adl_pci7x3x_pci_probe(struct pci_dev *dev, - const struct pci_device_id *ent) + const struct pci_device_id *id) { - return comedi_pci_auto_config(dev, &adl_pci7x3x_driver); + return comedi_pci_auto_config(dev, &adl_pci7x3x_driver, + id->driver_data); } static DEFINE_PCI_DEVICE_TABLE(adl_pci7x3x_pci_table) = { -- cgit v1.2.3-59-g8ed1b