[PATCH] staging: comedi: rework the comedi_auto_config 'context'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The 'context' passed to comedi_auto_config() is currently an unsigned
long value. This value is passed to the (*auto_attach)() function of a
comedi driver. Currently none of the comedi drivers use the 'context'.

The only callers of comedi_auto_config() are the two inline wrappers
comedi_pci_auto_config() and comedi_usb_auto_config(). Both of these
pass a 'context' of 0.

Change the 'context' to a const void * and rework the auto_config code
and the pci/usb drivers so that the 'context' passed is the struct
{pci,usb}_device_id * that is passed to the {pci,usb}_driver (*probe)()
function.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/comedidev.h                     | 14 ++++++++------
 drivers/staging/comedi/drivers.c                       |  2 +-
 drivers/staging/comedi/drivers/8255_pci.c              |  6 +++---
 drivers/staging/comedi/drivers/addi-data/addi_common.c |  2 +-
 drivers/staging/comedi/drivers/addi_apci_035.c         |  4 ++--
 drivers/staging/comedi/drivers/addi_apci_1032.c        |  6 +++---
 drivers/staging/comedi/drivers/addi_apci_1500.c        |  4 ++--
 drivers/staging/comedi/drivers/addi_apci_1516.c        |  6 +++---
 drivers/staging/comedi/drivers/addi_apci_1564.c        |  4 ++--
 drivers/staging/comedi/drivers/addi_apci_16xx.c        |  4 ++--
 drivers/staging/comedi/drivers/addi_apci_1710.c        |  6 +++---
 drivers/staging/comedi/drivers/addi_apci_2032.c        |  6 +++---
 drivers/staging/comedi/drivers/addi_apci_2200.c        |  4 ++--
 drivers/staging/comedi/drivers/addi_apci_3120.c        |  6 +++---
 drivers/staging/comedi/drivers/addi_apci_3200.c        |  4 ++--
 drivers/staging/comedi/drivers/addi_apci_3501.c        |  4 ++--
 drivers/staging/comedi/drivers/addi_apci_3xxx.c        |  4 ++--
 drivers/staging/comedi/drivers/adl_pci6208.c           |  6 +++---
 drivers/staging/comedi/drivers/adl_pci7x3x.c           |  6 +++---
 drivers/staging/comedi/drivers/adl_pci8164.c           |  6 +++---
 drivers/staging/comedi/drivers/adl_pci9111.c           |  6 +++---
 drivers/staging/comedi/drivers/adl_pci9118.c           |  6 +++---
 drivers/staging/comedi/drivers/adv_pci1710.c           |  6 +++---
 drivers/staging/comedi/drivers/adv_pci1723.c           |  6 +++---
 drivers/staging/comedi/drivers/adv_pci_dio.c           |  6 +++---
 drivers/staging/comedi/drivers/amplc_dio200.c          |  7 +++----
 drivers/staging/comedi/drivers/amplc_pc236.c           |  6 +++---
 drivers/staging/comedi/drivers/amplc_pc263.c           |  7 +++----
 drivers/staging/comedi/drivers/amplc_pci224.c          |  9 ++++-----
 drivers/staging/comedi/drivers/amplc_pci230.c          |  6 +++---
 drivers/staging/comedi/drivers/cb_pcidas.c             |  6 +++---
 drivers/staging/comedi/drivers/cb_pcidas64.c           |  6 +++---
 drivers/staging/comedi/drivers/cb_pcidda.c             |  6 +++---
 drivers/staging/comedi/drivers/cb_pcimdas.c            |  6 +++---
 drivers/staging/comedi/drivers/cb_pcimdda.c            |  6 +++---
 drivers/staging/comedi/drivers/contec_pci_dio.c        |  6 +++---
 drivers/staging/comedi/drivers/daqboard2000.c          |  6 +++---
 drivers/staging/comedi/drivers/das08.c                 |  6 +++---
 drivers/staging/comedi/drivers/dt3000.c                |  6 +++---
 drivers/staging/comedi/drivers/dyna_pci10xx.c          |  6 +++---
 drivers/staging/comedi/drivers/gsc_hpdi.c              |  6 +++---
 drivers/staging/comedi/drivers/icp_multi.c             |  6 +++---
 drivers/staging/comedi/drivers/jr3_pci.c               |  6 +++---
 drivers/staging/comedi/drivers/ke_counter.c            |  6 +++---
 drivers/staging/comedi/drivers/me4000.c                |  6 +++---
 drivers/staging/comedi/drivers/me_daq.c                |  6 +++---
 drivers/staging/comedi/drivers/ni_6527.c               |  6 +++---
 drivers/staging/comedi/drivers/ni_65xx.c               |  6 +++---
 drivers/staging/comedi/drivers/ni_660x.c               |  6 +++---
 drivers/staging/comedi/drivers/ni_670x.c               |  6 +++---
 drivers/staging/comedi/drivers/ni_labpc.c              |  6 +++---
 drivers/staging/comedi/drivers/ni_pcidio.c             |  6 +++---
 drivers/staging/comedi/drivers/ni_pcimio.c             |  6 +++---
 drivers/staging/comedi/drivers/rtd520.c                |  6 +++---
 drivers/staging/comedi/drivers/s626.c                  |  6 +++---
 drivers/staging/comedi/drivers/skel.c                  |  6 +++---
 drivers/staging/comedi/drivers/usbdux.c                |  7 +++++--
 drivers/staging/comedi/drivers/usbduxfast.c            |  7 +++++--
 drivers/staging/comedi/drivers/usbduxsigma.c           |  7 +++++--
 drivers/staging/comedi/drivers/vmk80xx.c               |  4 ++--
 60 files changed, 179 insertions(+), 171 deletions(-)

diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
index 692e1e6..80f88f4 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -201,7 +201,7 @@ struct comedi_driver {
 	struct module *module;
 	int (*attach) (struct comedi_device *, struct comedi_devconfig *);
 	void (*detach) (struct comedi_device *);
-	int (*auto_attach) (struct comedi_device *, unsigned long);
+	int (*auto_attach) (struct comedi_device *, const void *);
 
 	/* number of elements in board_name and board_id arrays */
 	unsigned int num_names;
@@ -515,13 +515,14 @@ int comedi_alloc_subdevice_minor(struct comedi_device *dev,
 				 struct comedi_subdevice *s);
 void comedi_free_subdevice_minor(struct comedi_subdevice *s);
 int comedi_auto_config(struct device *hardware_device,
-		       struct comedi_driver *driver, unsigned long context);
+		       struct comedi_driver *driver, const void *context);
 void comedi_auto_unconfig(struct device *hardware_device);
 
 static inline int comedi_pci_auto_config(struct pci_dev *pcidev,
-					 struct comedi_driver *driver)
+					 struct comedi_driver *driver,
+					 const struct pci_device_id *id)
 {
-	return comedi_auto_config(&pcidev->dev, driver, 0);
+	return comedi_auto_config(&pcidev->dev, driver, id);
 }
 
 static inline void comedi_pci_auto_unconfig(struct pci_dev *pcidev)
@@ -530,9 +531,10 @@ static inline void comedi_pci_auto_unconfig(struct pci_dev *pcidev)
 }
 
 static inline int comedi_usb_auto_config(struct usb_interface *intf,
-					 struct comedi_driver *driver)
+					 struct comedi_driver *driver,
+					 const struct usb_device_id *id)
 {
-	return comedi_auto_config(&intf->dev, driver, 0);
+	return comedi_auto_config(&intf->dev, driver, id);
 }
 
 static inline void comedi_usb_auto_unconfig(struct usb_interface *intf)
diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c
index 50cf498..5c0a1ea 100644
--- a/drivers/staging/comedi/drivers.c
+++ b/drivers/staging/comedi/drivers.c
@@ -831,7 +831,7 @@ void comedi_reset_async_buf(struct comedi_async *async)
 }
 
 int comedi_auto_config(struct device *hardware_device,
-		       struct comedi_driver *driver, unsigned long context)
+		       struct comedi_driver *driver, const void *context)
 {
 	int minor;
 	struct comedi_device_file_info *dev_file_info;
diff --git a/drivers/staging/comedi/drivers/8255_pci.c b/drivers/staging/comedi/drivers/8255_pci.c
index e0a7952..3cbc95e 100644
--- a/drivers/staging/comedi/drivers/8255_pci.c
+++ b/drivers/staging/comedi/drivers/8255_pci.c
@@ -214,7 +214,7 @@ static const void *pci_8255_find_boardinfo(struct comedi_device *dev,
 }
 
 static int pci_8255_auto_attach(struct comedi_device *dev,
-					  unsigned long context_unused)
+				const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	const struct pci_8255_boardinfo *board;
@@ -309,9 +309,9 @@ static struct comedi_driver pci_8255_driver = {
 };
 
 static int pci_8255_pci_probe(struct pci_dev *dev,
-					const struct pci_device_id *ent)
+			      const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &pci_8255_driver);
+	return comedi_pci_auto_config(dev, &pci_8255_driver, id);
 }
 
 static void pci_8255_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.c b/drivers/staging/comedi/drivers/addi-data/addi_common.c
index 90cc432..c89478d 100644
--- a/drivers/staging/comedi/drivers/addi-data/addi_common.c
+++ b/drivers/staging/comedi/drivers/addi-data/addi_common.c
@@ -94,7 +94,7 @@ static const void *addi_find_boardinfo(struct comedi_device *dev,
 }
 
 static int addi_auto_attach(struct comedi_device *dev,
-				      unsigned long context_unused)
+			    const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	const struct addi_board *this_board;
diff --git a/drivers/staging/comedi/drivers/addi_apci_035.c b/drivers/staging/comedi/drivers/addi_apci_035.c
index c981d4b..31349eb 100644
--- a/drivers/staging/comedi/drivers/addi_apci_035.c
+++ b/drivers/staging/comedi/drivers/addi_apci_035.c
@@ -48,9 +48,9 @@ static struct comedi_driver apci035_driver = {
 };
 
 static int apci035_pci_probe(struct pci_dev *dev,
-				       const struct pci_device_id *ent)
+			     const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &apci035_driver);
+	return comedi_pci_auto_config(dev, &apci035_driver, id);
 }
 
 static void apci035_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/addi_apci_1032.c b/drivers/staging/comedi/drivers/addi_apci_1032.c
index 7f94242..36b9718 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1032.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1032.c
@@ -286,7 +286,7 @@ static int apci1032_di_insn_bits(struct comedi_device *dev,
 }
 
 static int apci1032_auto_attach(struct comedi_device *dev,
-					  unsigned long context_unused)
+				const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	struct apci1032_private *devpriv;
@@ -370,9 +370,9 @@ static struct comedi_driver apci1032_driver = {
 };
 
 static int apci1032_pci_probe(struct pci_dev *dev,
-					const struct pci_device_id *ent)
+			      const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &apci1032_driver);
+	return comedi_pci_auto_config(dev, &apci1032_driver, id);
 }
 
 static void apci1032_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/addi_apci_1500.c b/drivers/staging/comedi/drivers/addi_apci_1500.c
index 8e686a9..e88a0af 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1500.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1500.c
@@ -48,9 +48,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);
 }
 
 static void apci1500_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/addi_apci_1516.c b/drivers/staging/comedi/drivers/addi_apci_1516.c
index 8fef04b..a046139 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1516.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1516.c
@@ -226,7 +226,7 @@ static const void *apci1516_find_boardinfo(struct comedi_device *dev,
 }
 
 static int apci1516_auto_attach(struct comedi_device *dev,
-					  unsigned long context_unused)
+				const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	const struct apci1516_boardinfo *this_board;
@@ -318,9 +318,9 @@ static struct comedi_driver apci1516_driver = {
 };
 
 static int apci1516_pci_probe(struct pci_dev *dev,
-					const struct pci_device_id *ent)
+			      const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &apci1516_driver);
+	return comedi_pci_auto_config(dev, &apci1516_driver, id);
 }
 
 static void apci1516_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c
index 513e536..30f0c75 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1564.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1564.c
@@ -45,9 +45,9 @@ static struct comedi_driver apci1564_driver = {
 };
 
 static int apci1564_pci_probe(struct pci_dev *dev,
-					const struct pci_device_id *ent)
+			      const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &apci1564_driver);
+	return comedi_pci_auto_config(dev, &apci1564_driver, id);
 }
 
 static void apci1564_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/addi_apci_16xx.c b/drivers/staging/comedi/drivers/addi_apci_16xx.c
index ab9a96a..d5c341b 100644
--- a/drivers/staging/comedi/drivers/addi_apci_16xx.c
+++ b/drivers/staging/comedi/drivers/addi_apci_16xx.c
@@ -47,9 +47,9 @@ static struct comedi_driver apci16xx_driver = {
 };
 
 static int apci16xx_pci_probe(struct pci_dev *dev,
-					const struct pci_device_id *ent)
+			      const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &apci16xx_driver);
+	return comedi_pci_auto_config(dev, &apci16xx_driver, id);
 }
 
 static void apci16xx_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/addi_apci_1710.c b/drivers/staging/comedi/drivers/addi_apci_1710.c
index 152e7ef..b73a7e75 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1710.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1710.c
@@ -53,7 +53,7 @@ static const void *apci1710_find_boardinfo(struct comedi_device *dev,
 }
 
 static int apci1710_auto_attach(struct comedi_device *dev,
-					  unsigned long context_unused)
+				const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	const struct addi_board *this_board;
@@ -123,9 +123,9 @@ static struct comedi_driver apci1710_driver = {
 };
 
 static int apci1710_pci_probe(struct pci_dev *dev,
-					const struct pci_device_id *ent)
+			      const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &apci1710_driver);
+	return comedi_pci_auto_config(dev, &apci1710_driver, id);
 }
 
 static void apci1710_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/addi_apci_2032.c b/drivers/staging/comedi/drivers/addi_apci_2032.c
index 8f8d3e9..0c82600 100644
--- a/drivers/staging/comedi/drivers/addi_apci_2032.c
+++ b/drivers/staging/comedi/drivers/addi_apci_2032.c
@@ -263,7 +263,7 @@ static int apci2032_reset(struct comedi_device *dev)
 }
 
 static int apci2032_auto_attach(struct comedi_device *dev,
-				unsigned long context_unused)
+				const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	struct apci2032_private *devpriv;
@@ -355,9 +355,9 @@ static struct comedi_driver apci2032_driver = {
 };
 
 static int apci2032_pci_probe(struct pci_dev *dev,
-					const struct pci_device_id *ent)
+			      const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &apci2032_driver);
+	return comedi_pci_auto_config(dev, &apci2032_driver, id);
 }
 
 static void apci2032_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/addi_apci_2200.c b/drivers/staging/comedi/drivers/addi_apci_2200.c
index 7c2c5db..1cde258 100644
--- a/drivers/staging/comedi/drivers/addi_apci_2200.c
+++ b/drivers/staging/comedi/drivers/addi_apci_2200.c
@@ -40,9 +40,9 @@ static struct comedi_driver apci2200_driver = {
 };
 
 static int apci2200_pci_probe(struct pci_dev *dev,
-					const struct pci_device_id *ent)
+			      const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &apci2200_driver);
+	return comedi_pci_auto_config(dev, &apci2200_driver, id);
 }
 
 static void apci2200_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/addi_apci_3120.c b/drivers/staging/comedi/drivers/addi_apci_3120.c
index fec2962..2daf421 100644
--- a/drivers/staging/comedi/drivers/addi_apci_3120.c
+++ b/drivers/staging/comedi/drivers/addi_apci_3120.c
@@ -61,7 +61,7 @@ static const void *apci3120_find_boardinfo(struct comedi_device *dev,
 }
 
 static int apci3120_auto_attach(struct comedi_device *dev,
-					  unsigned long context_unused)
+				const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	const struct addi_board *this_board;
@@ -246,9 +246,9 @@ static struct comedi_driver apci3120_driver = {
 };
 
 static int apci3120_pci_probe(struct pci_dev *dev,
-					const struct pci_device_id *ent)
+			      const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &apci3120_driver);
+	return comedi_pci_auto_config(dev, &apci3120_driver, id);
 }
 
 static void apci3120_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/addi_apci_3200.c b/drivers/staging/comedi/drivers/addi_apci_3200.c
index 9085b77..e9f8975 100644
--- a/drivers/staging/comedi/drivers/addi_apci_3200.c
+++ b/drivers/staging/comedi/drivers/addi_apci_3200.c
@@ -101,9 +101,9 @@ static struct comedi_driver apci3200_driver = {
 };
 
 static int apci3200_pci_probe(struct pci_dev *dev,
-					const struct pci_device_id *ent)
+			      const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &apci3200_driver);
+	return comedi_pci_auto_config(dev, &apci3200_driver, id);
 }
 
 static void apci3200_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/addi_apci_3501.c b/drivers/staging/comedi/drivers/addi_apci_3501.c
index ed297de..d657835 100644
--- a/drivers/staging/comedi/drivers/addi_apci_3501.c
+++ b/drivers/staging/comedi/drivers/addi_apci_3501.c
@@ -52,9 +52,9 @@ static struct comedi_driver apci3501_driver = {
 };
 
 static int apci3501_pci_probe(struct pci_dev *dev,
-					const struct pci_device_id *ent)
+			      const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &apci3501_driver);
+	return comedi_pci_auto_config(dev, &apci3501_driver, id);
 }
 
 static void apci3501_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/addi_apci_3xxx.c b/drivers/staging/comedi/drivers/addi_apci_3xxx.c
index 1562347..cf00681 100644
--- a/drivers/staging/comedi/drivers/addi_apci_3xxx.c
+++ b/drivers/staging/comedi/drivers/addi_apci_3xxx.c
@@ -746,9 +746,9 @@ static struct comedi_driver apci3xxx_driver = {
 };
 
 static int apci3xxx_pci_probe(struct pci_dev *dev,
-					const struct pci_device_id *ent)
+			      const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &apci3xxx_driver);
+	return comedi_pci_auto_config(dev, &apci3xxx_driver, id);
 }
 
 static void apci3xxx_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/adl_pci6208.c b/drivers/staging/comedi/drivers/adl_pci6208.c
index 9a56eed..35a4500 100644
--- a/drivers/staging/comedi/drivers/adl_pci6208.c
+++ b/drivers/staging/comedi/drivers/adl_pci6208.c
@@ -175,7 +175,7 @@ static const void *pci6208_find_boardinfo(struct comedi_device *dev,
 }
 
 static int pci6208_auto_attach(struct comedi_device *dev,
-					 unsigned long context_unused)
+			       const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	const struct pci6208_board *boardinfo;
@@ -265,9 +265,9 @@ static struct comedi_driver adl_pci6208_driver = {
 };
 
 static int adl_pci6208_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_pci6208_driver);
+	return comedi_pci_auto_config(dev, &adl_pci6208_driver, id);
 }
 
 static void adl_pci6208_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/adl_pci7x3x.c b/drivers/staging/comedi/drivers/adl_pci7x3x.c
index 772edc0..e18fd7b 100644
--- a/drivers/staging/comedi/drivers/adl_pci7x3x.c
+++ b/drivers/staging/comedi/drivers/adl_pci7x3x.c
@@ -169,7 +169,7 @@ static const void *adl_pci7x3x_find_boardinfo(struct comedi_device *dev,
 }
 
 static int adl_pci7x3x_auto_attach(struct comedi_device *dev,
-					     unsigned long context_unused)
+				   const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	const struct adl_pci7x3x_boardinfo *board;
@@ -297,9 +297,9 @@ 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);
 }
 
 static void adl_pci7x3x_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/adl_pci8164.c b/drivers/staging/comedi/drivers/adl_pci8164.c
index 4dd9d70..70db56a 100644
--- a/drivers/staging/comedi/drivers/adl_pci8164.c
+++ b/drivers/staging/comedi/drivers/adl_pci8164.c
@@ -213,7 +213,7 @@ static int adl_pci8164_insn_write_buf1(struct comedi_device *dev,
 }
 
 static int adl_pci8164_auto_attach(struct comedi_device *dev,
-					     unsigned long context_unused)
+				   const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	struct comedi_subdevice *s;
@@ -293,9 +293,9 @@ static struct comedi_driver adl_pci8164_driver = {
 };
 
 static int adl_pci8164_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_pci8164_driver);
+	return comedi_pci_auto_config(dev, &adl_pci8164_driver, id);
 }
 
 static void adl_pci8164_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/adl_pci9111.c b/drivers/staging/comedi/drivers/adl_pci9111.c
index a339b9d..2ef168e 100644
--- a/drivers/staging/comedi/drivers/adl_pci9111.c
+++ b/drivers/staging/comedi/drivers/adl_pci9111.c
@@ -857,7 +857,7 @@ static int pci9111_reset(struct comedi_device *dev)
 }
 
 static int pci9111_auto_attach(struct comedi_device *dev,
-					 unsigned long context_unused)
+			       const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	struct pci9111_private_data *dev_private;
@@ -958,9 +958,9 @@ static struct comedi_driver adl_pci9111_driver = {
 };
 
 static int pci9111_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_pci9111_driver);
+	return comedi_pci_auto_config(dev, &adl_pci9111_driver, id);
 }
 
 static void pci9111_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/drivers/staging/comedi/drivers/adl_pci9118.c
index b6dda80..3f5d22b 100644
--- a/drivers/staging/comedi/drivers/adl_pci9118.c
+++ b/drivers/staging/comedi/drivers/adl_pci9118.c
@@ -2156,7 +2156,7 @@ static int pci9118_attach(struct comedi_device *dev,
 }
 
 static int pci9118_auto_attach(struct comedi_device *dev,
-					 unsigned long context_unused)
+			       const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	struct pci9118_private *devpriv;
@@ -2220,9 +2220,9 @@ static struct comedi_driver adl_pci9118_driver = {
 };
 
 static int adl_pci9118_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_pci9118_driver);
+	return comedi_pci_auto_config(dev, &adl_pci9118_driver, id);
 }
 
 static void adl_pci9118_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c b/drivers/staging/comedi/drivers/adv_pci1710.c
index a6fd8c2..ffaa730 100644
--- a/drivers/staging/comedi/drivers/adv_pci1710.c
+++ b/drivers/staging/comedi/drivers/adv_pci1710.c
@@ -1234,7 +1234,7 @@ static const void *pci1710_find_boardinfo(struct comedi_device *dev,
 }
 
 static int pci1710_auto_attach(struct comedi_device *dev,
-					 unsigned long context_unused)
+			       const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	const struct boardtype *this_board;
@@ -1397,9 +1397,9 @@ static struct comedi_driver adv_pci1710_driver = {
 };
 
 static int adv_pci1710_pci_probe(struct pci_dev *dev,
-					   const struct pci_device_id *ent)
+				 const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &adv_pci1710_driver);
+	return comedi_pci_auto_config(dev, &adv_pci1710_driver, id);
 }
 
 static void adv_pci1710_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/adv_pci1723.c b/drivers/staging/comedi/drivers/adv_pci1723.c
index 5af7314..12058f2 100644
--- a/drivers/staging/comedi/drivers/adv_pci1723.c
+++ b/drivers/staging/comedi/drivers/adv_pci1723.c
@@ -233,7 +233,7 @@ static int pci1723_dio_insn_bits(struct comedi_device *dev,
 }
 
 static int pci1723_auto_attach(struct comedi_device *dev,
-					 unsigned long context_unused)
+			       const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	struct pci1723_private *devpriv;
@@ -322,9 +322,9 @@ static struct comedi_driver adv_pci1723_driver = {
 };
 
 static int adv_pci1723_pci_probe(struct pci_dev *dev,
-					   const struct pci_device_id *ent)
+				 const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &adv_pci1723_driver);
+	return comedi_pci_auto_config(dev, &adv_pci1723_driver, id);
 }
 
 static void adv_pci1723_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/adv_pci_dio.c b/drivers/staging/comedi/drivers/adv_pci_dio.c
index 05a663e..7a1adf9 100644
--- a/drivers/staging/comedi/drivers/adv_pci_dio.c
+++ b/drivers/staging/comedi/drivers/adv_pci_dio.c
@@ -1091,7 +1091,7 @@ static const void *pci_dio_find_boardinfo(struct comedi_device *dev,
 }
 
 static int pci_dio_auto_attach(struct comedi_device *dev,
-					 unsigned long context_unused)
+			       const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	const struct dio_boardtype *this_board;
@@ -1201,9 +1201,9 @@ static struct comedi_driver adv_pci_dio_driver = {
 };
 
 static int adv_pci_dio_pci_probe(struct pci_dev *dev,
-					   const struct pci_device_id *ent)
+				 const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &adv_pci_dio_driver);
+	return comedi_pci_auto_config(dev, &adv_pci_dio_driver, id);
 }
 
 static void adv_pci_dio_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/amplc_dio200.c b/drivers/staging/comedi/drivers/amplc_dio200.c
index 5f309ba..fd102c7 100644
--- a/drivers/staging/comedi/drivers/amplc_dio200.c
+++ b/drivers/staging/comedi/drivers/amplc_dio200.c
@@ -1926,7 +1926,7 @@ static int dio200_attach(struct comedi_device *dev, struct comedi_devconfig *it)
  * There should be a board entry matching the supplied PCI device.
  */
 static int dio200_auto_attach(struct comedi_device *dev,
-					unsigned long context_unused)
+			      const void *context_unused)
 {
 	struct pci_dev *pci_dev = comedi_to_pci_dev(dev);
 	const struct dio200_board *thisboard;
@@ -2073,10 +2073,9 @@ static DEFINE_PCI_DEVICE_TABLE(dio200_pci_table) = {
 MODULE_DEVICE_TABLE(pci, dio200_pci_table);
 
 static int amplc_dio200_pci_probe(struct pci_dev *dev,
-						   const struct pci_device_id
-						   *ent)
+				  const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &amplc_dio200_driver);
+	return comedi_pci_auto_config(dev, &amplc_dio200_driver, id);
 }
 
 static void amplc_dio200_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/amplc_pc236.c b/drivers/staging/comedi/drivers/amplc_pc236.c
index 2898354..f20fb7a 100644
--- a/drivers/staging/comedi/drivers/amplc_pc236.c
+++ b/drivers/staging/comedi/drivers/amplc_pc236.c
@@ -527,7 +527,7 @@ static int pc236_attach(struct comedi_device *dev, struct comedi_devconfig *it)
  * There should be a board entry matching the supplied PCI device.
  */
 static int pc236_auto_attach(struct comedi_device *dev,
-				       unsigned long context_unused)
+			     const void *context_unused)
 {
 	struct pci_dev *pci_dev = comedi_to_pci_dev(dev);
 	struct pc236_private *devpriv;
@@ -609,9 +609,9 @@ static DEFINE_PCI_DEVICE_TABLE(pc236_pci_table) = {
 MODULE_DEVICE_TABLE(pci, pc236_pci_table);
 
 static int amplc_pc236_pci_probe(struct pci_dev *dev,
-					   const struct pci_device_id *ent)
+				 const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &amplc_pc236_driver);
+	return comedi_pci_auto_config(dev, &amplc_pc236_driver, id);
 }
 
 static void amplc_pc236_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/amplc_pc263.c b/drivers/staging/comedi/drivers/amplc_pc263.c
index dfbff77..a200451 100644
--- a/drivers/staging/comedi/drivers/amplc_pc263.c
+++ b/drivers/staging/comedi/drivers/amplc_pc263.c
@@ -297,7 +297,7 @@ static int pc263_attach(struct comedi_device *dev, struct comedi_devconfig *it)
  * There should be a board entry matching the supplied PCI device.
  */
 static int pc263_auto_attach(struct comedi_device *dev,
-				       unsigned long context_unused)
+			     const void *context_unused)
 {
 	struct pci_dev *pci_dev;
 
@@ -366,10 +366,9 @@ static DEFINE_PCI_DEVICE_TABLE(pc263_pci_table) = {
 MODULE_DEVICE_TABLE(pci, pc263_pci_table);
 
 static int amplc_pc263_pci_probe(struct pci_dev *dev,
-						  const struct pci_device_id
-						  *ent)
+				 const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &amplc_pc263_driver);
+	return comedi_pci_auto_config(dev, &amplc_pc263_driver, id);
 }
 
 static void amplc_pc263_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c b/drivers/staging/comedi/drivers/amplc_pci224.c
index 6e2566a..cc31686 100644
--- a/drivers/staging/comedi/drivers/amplc_pci224.c
+++ b/drivers/staging/comedi/drivers/amplc_pci224.c
@@ -1438,8 +1438,8 @@ static int pci224_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 	return pci224_attach_common(dev, pci_dev, it->options);
 }
 
-static int
-pci224_auto_attach(struct comedi_device *dev, unsigned long context_unused)
+static int pci224_auto_attach(struct comedi_device *dev,
+			      const void *context_unused)
 {
 	struct pci_dev *pci_dev = comedi_to_pci_dev(dev);
 	struct pci224_private *devpriv;
@@ -1506,10 +1506,9 @@ static struct comedi_driver amplc_pci224_driver = {
 };
 
 static int amplc_pci224_pci_probe(struct pci_dev *dev,
-						   const struct pci_device_id
-						   *ent)
+				  const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &amplc_pci224_driver);
+	return comedi_pci_auto_config(dev, &amplc_pci224_driver, id);
 }
 
 static void amplc_pci224_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/amplc_pci230.c b/drivers/staging/comedi/drivers/amplc_pci230.c
index 366c68b..74a0bbb 100644
--- a/drivers/staging/comedi/drivers/amplc_pci230.c
+++ b/drivers/staging/comedi/drivers/amplc_pci230.c
@@ -2802,7 +2802,7 @@ static int pci230_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 }
 
 static int pci230_auto_attach(struct comedi_device *dev,
-					unsigned long context_unused)
+			      const void *context_unused)
 {
 	struct pci_dev *pci_dev = comedi_to_pci_dev(dev);
 	int rc;
@@ -2858,9 +2858,9 @@ static struct comedi_driver amplc_pci230_driver = {
 };
 
 static int amplc_pci230_pci_probe(struct pci_dev *dev,
-					    const struct pci_device_id *ent)
+				  const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &amplc_pci230_driver);
+	return comedi_pci_auto_config(dev, &amplc_pci230_driver, id);
 }
 
 static void amplc_pci230_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/cb_pcidas.c b/drivers/staging/comedi/drivers/cb_pcidas.c
index aed6863..32915b9 100644
--- a/drivers/staging/comedi/drivers/cb_pcidas.c
+++ b/drivers/staging/comedi/drivers/cb_pcidas.c
@@ -1437,7 +1437,7 @@ static const void *cb_pcidas_find_boardinfo(struct comedi_device *dev,
 }
 
 static int cb_pcidas_auto_attach(struct comedi_device *dev,
-					   unsigned long context_unused)
+				 const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	const struct cb_pcidas_board *thisboard;
@@ -1627,9 +1627,9 @@ static struct comedi_driver cb_pcidas_driver = {
 };
 
 static int cb_pcidas_pci_probe(struct pci_dev *dev,
-					 const struct pci_device_id *ent)
+			       const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &cb_pcidas_driver);
+	return comedi_pci_auto_config(dev, &cb_pcidas_driver, id);
 }
 
 static void cb_pcidas_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c
index d72b46c..40d8959 100644
--- a/drivers/staging/comedi/drivers/cb_pcidas64.c
+++ b/drivers/staging/comedi/drivers/cb_pcidas64.c
@@ -4044,7 +4044,7 @@ static const struct pcidas64_board
 }
 
 static int auto_attach(struct comedi_device *dev,
-				 unsigned long context_unused)
+		       const void *context_unused)
 {
 	const struct pcidas64_board *thisboard;
 	struct pcidas64_private *devpriv;
@@ -4215,9 +4215,9 @@ static struct comedi_driver cb_pcidas64_driver = {
 };
 
 static int cb_pcidas64_pci_probe(struct pci_dev *dev,
-					   const struct pci_device_id *ent)
+				 const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &cb_pcidas64_driver);
+	return comedi_pci_auto_config(dev, &cb_pcidas64_driver, id);
 }
 
 static void cb_pcidas64_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/cb_pcidda.c b/drivers/staging/comedi/drivers/cb_pcidda.c
index 7c6029a..6310ef3 100644
--- a/drivers/staging/comedi/drivers/cb_pcidda.c
+++ b/drivers/staging/comedi/drivers/cb_pcidda.c
@@ -350,7 +350,7 @@ static const void *cb_pcidda_find_boardinfo(struct comedi_device *dev,
 }
 
 static int cb_pcidda_auto_attach(struct comedi_device *dev,
-					   unsigned long context_unused)
+				 const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	const struct cb_pcidda_board *thisboard;
@@ -433,9 +433,9 @@ static struct comedi_driver cb_pcidda_driver = {
 };
 
 static int cb_pcidda_pci_probe(struct pci_dev *dev,
-					 const struct pci_device_id *ent)
+			       const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &cb_pcidda_driver);
+	return comedi_pci_auto_config(dev, &cb_pcidda_driver, id);
 }
 
 static void cb_pcidda_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/cb_pcimdas.c b/drivers/staging/comedi/drivers/cb_pcimdas.c
index b43a5f8..7d9eff6 100644
--- a/drivers/staging/comedi/drivers/cb_pcimdas.c
+++ b/drivers/staging/comedi/drivers/cb_pcimdas.c
@@ -206,7 +206,7 @@ static int cb_pcimdas_ao_rinsn(struct comedi_device *dev,
 }
 
 static int cb_pcimdas_auto_attach(struct comedi_device *dev,
-					    unsigned long context_unused)
+				  const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	struct cb_pcimdas_private *devpriv;
@@ -294,9 +294,9 @@ static struct comedi_driver cb_pcimdas_driver = {
 };
 
 static int cb_pcimdas_pci_probe(struct pci_dev *dev,
-					  const struct pci_device_id *ent)
+				const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &cb_pcimdas_driver);
+	return comedi_pci_auto_config(dev, &cb_pcimdas_driver, id);
 }
 
 static void cb_pcimdas_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/cb_pcimdda.c b/drivers/staging/comedi/drivers/cb_pcimdda.c
index 699b84f..ba91c14 100644
--- a/drivers/staging/comedi/drivers/cb_pcimdda.c
+++ b/drivers/staging/comedi/drivers/cb_pcimdda.c
@@ -152,7 +152,7 @@ static int cb_pcimdda_ao_rinsn(struct comedi_device *dev,
 }
 
 static int cb_pcimdda_auto_attach(struct comedi_device *dev,
-					    unsigned long context_unused)
+				  const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	struct cb_pcimdda_private *devpriv;
@@ -217,9 +217,9 @@ static struct comedi_driver cb_pcimdda_driver = {
 };
 
 static int cb_pcimdda_pci_probe(struct pci_dev *dev,
-					  const struct pci_device_id *ent)
+				const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &cb_pcimdda_driver);
+	return comedi_pci_auto_config(dev, &cb_pcimdda_driver, id);
 }
 
 static void cb_pcimdda_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/contec_pci_dio.c b/drivers/staging/comedi/drivers/contec_pci_dio.c
index 1a18fa3..f595280 100644
--- a/drivers/staging/comedi/drivers/contec_pci_dio.c
+++ b/drivers/staging/comedi/drivers/contec_pci_dio.c
@@ -69,7 +69,7 @@ static int contec_di_insn_bits(struct comedi_device *dev,
 }
 
 static int contec_auto_attach(struct comedi_device *dev,
-					unsigned long context_unused)
+			      const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	struct comedi_subdevice *s;
@@ -125,9 +125,9 @@ static struct comedi_driver contec_pci_dio_driver = {
 };
 
 static int contec_pci_dio_pci_probe(struct pci_dev *dev,
-					      const struct pci_device_id *ent)
+				    const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &contec_pci_dio_driver);
+	return comedi_pci_auto_config(dev, &contec_pci_dio_driver, id);
 }
 
 static void contec_pci_dio_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c
index 992e557..a04ff01 100644
--- a/drivers/staging/comedi/drivers/daqboard2000.c
+++ b/drivers/staging/comedi/drivers/daqboard2000.c
@@ -689,7 +689,7 @@ static const void *daqboard2000_find_boardinfo(struct comedi_device *dev,
 }
 
 static int daqboard2000_auto_attach(struct comedi_device *dev,
-					      unsigned long context_unused)
+				    const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	const struct daq200_boardtype *board;
@@ -794,9 +794,9 @@ static struct comedi_driver daqboard2000_driver = {
 };
 
 static int daqboard2000_pci_probe(struct pci_dev *dev,
-					    const struct pci_device_id *ent)
+				  const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &daqboard2000_driver);
+	return comedi_pci_auto_config(dev, &daqboard2000_driver, id);
 }
 
 static void daqboard2000_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/comedi/drivers/das08.c
index b15e058..1544dad 100644
--- a/drivers/staging/comedi/drivers/das08.c
+++ b/drivers/staging/comedi/drivers/das08.c
@@ -775,7 +775,7 @@ das08_find_pci_board(struct pci_dev *pdev)
 
 /* only called in the PCI probe path, via comedi_pci_auto_config() */
 static int __maybe_unused
-das08_auto_attach(struct comedi_device *dev, unsigned long context_unused)
+das08_auto_attach(struct comedi_device *dev, const void *context_unused)
 {
 	struct pci_dev *pdev;
 	struct das08_private_struct *devpriv;
@@ -886,9 +886,9 @@ static DEFINE_PCI_DEVICE_TABLE(das08_pci_table) = {
 MODULE_DEVICE_TABLE(pci, das08_pci_table);
 
 static int das08_pci_probe(struct pci_dev *dev,
-					    const struct pci_device_id *ent)
+			   const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &das08_driver);
+	return comedi_pci_auto_config(dev, &das08_driver, id);
 }
 
 static void das08_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/dt3000.c b/drivers/staging/comedi/drivers/dt3000.c
index 960da8d..80377e0 100644
--- a/drivers/staging/comedi/drivers/dt3000.c
+++ b/drivers/staging/comedi/drivers/dt3000.c
@@ -729,7 +729,7 @@ static const void *dt3000_find_boardinfo(struct comedi_device *dev,
 }
 
 static int dt3000_auto_attach(struct comedi_device *dev,
-					unsigned long context_unused)
+			      const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	const struct dt3k_boardtype *this_board;
@@ -851,9 +851,9 @@ static struct comedi_driver dt3000_driver = {
 };
 
 static int dt3000_pci_probe(struct pci_dev *dev,
-				      const struct pci_device_id *ent)
+			    const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &dt3000_driver);
+	return comedi_pci_auto_config(dev, &dt3000_driver, id);
 }
 
 static void dt3000_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/dyna_pci10xx.c b/drivers/staging/comedi/drivers/dyna_pci10xx.c
index 8497a36..6398c81 100644
--- a/drivers/staging/comedi/drivers/dyna_pci10xx.c
+++ b/drivers/staging/comedi/drivers/dyna_pci10xx.c
@@ -178,7 +178,7 @@ static int dyna_pci10xx_do_insn_bits(struct comedi_device *dev,
 }
 
 static int dyna_pci10xx_auto_attach(struct comedi_device *dev,
-					      unsigned long context_unused)
+				    const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	struct dyna_pci10xx_private *devpriv;
@@ -271,9 +271,9 @@ static struct comedi_driver dyna_pci10xx_driver = {
 };
 
 static int dyna_pci10xx_pci_probe(struct pci_dev *dev,
-					    const struct pci_device_id *ent)
+				  const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &dyna_pci10xx_driver);
+	return comedi_pci_auto_config(dev, &dyna_pci10xx_driver, id);
 }
 
 static void dyna_pci10xx_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/gsc_hpdi.c b/drivers/staging/comedi/drivers/gsc_hpdi.c
index 154598f..bac4e964 100644
--- a/drivers/staging/comedi/drivers/gsc_hpdi.c
+++ b/drivers/staging/comedi/drivers/gsc_hpdi.c
@@ -475,7 +475,7 @@ static const struct hpdi_board *hpdi_find_board(struct pci_dev *pcidev)
 }
 
 static int hpdi_auto_attach(struct comedi_device *dev,
-				      unsigned long context_unused)
+			    const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	const struct hpdi_board *thisboard;
@@ -941,9 +941,9 @@ static struct comedi_driver gsc_hpdi_driver = {
 };
 
 static int gsc_hpdi_pci_probe(struct pci_dev *dev,
-					const struct pci_device_id *ent)
+			      const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &gsc_hpdi_driver);
+	return comedi_pci_auto_config(dev, &gsc_hpdi_driver, id);
 }
 
 static void gsc_hpdi_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/icp_multi.c b/drivers/staging/comedi/drivers/icp_multi.c
index a91a448..bf1e587 100644
--- a/drivers/staging/comedi/drivers/icp_multi.c
+++ b/drivers/staging/comedi/drivers/icp_multi.c
@@ -495,7 +495,7 @@ static int icp_multi_reset(struct comedi_device *dev)
 }
 
 static int icp_multi_auto_attach(struct comedi_device *dev,
-					   unsigned long context_unused)
+				 const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	struct icp_multi_private *devpriv;
@@ -618,9 +618,9 @@ static struct comedi_driver icp_multi_driver = {
 };
 
 static int icp_multi_pci_probe(struct pci_dev *dev,
-					   const struct pci_device_id *ent)
+			       const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &icp_multi_driver);
+	return comedi_pci_auto_config(dev, &icp_multi_driver, id);
 }
 
 static void icp_multi_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c
index c756a35..c055f32 100644
--- a/drivers/staging/comedi/drivers/jr3_pci.c
+++ b/drivers/staging/comedi/drivers/jr3_pci.c
@@ -658,7 +658,7 @@ static void jr3_pci_poll_dev(unsigned long data)
 }
 
 static int jr3_pci_auto_attach(struct comedi_device *dev,
-					 unsigned long context_unused)
+			       const void *context_unused)
 {
 	int result;
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
@@ -839,9 +839,9 @@ static struct comedi_driver jr3_pci_driver = {
 };
 
 static int jr3_pci_pci_probe(struct pci_dev *dev,
-				       const struct pci_device_id *ent)
+			     const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &jr3_pci_driver);
+	return comedi_pci_auto_config(dev, &jr3_pci_driver, id);
 }
 
 static void jr3_pci_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/ke_counter.c b/drivers/staging/comedi/drivers/ke_counter.c
index 19c9428..9c0d771 100644
--- a/drivers/staging/comedi/drivers/ke_counter.c
+++ b/drivers/staging/comedi/drivers/ke_counter.c
@@ -88,7 +88,7 @@ static int cnt_rinsn(struct comedi_device *dev,
 }
 
 static int cnt_auto_attach(struct comedi_device *dev,
-				     unsigned long context_unused)
+			   const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	struct comedi_subdevice *s;
@@ -147,9 +147,9 @@ static struct comedi_driver ke_counter_driver = {
 };
 
 static int ke_counter_pci_probe(struct pci_dev *dev,
-					  const struct pci_device_id *ent)
+				const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &ke_counter_driver);
+	return comedi_pci_auto_config(dev, &ke_counter_driver, id);
 }
 
 static void ke_counter_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c
index 3c4b022..0b6ef89 100644
--- a/drivers/staging/comedi/drivers/me4000.c
+++ b/drivers/staging/comedi/drivers/me4000.c
@@ -1564,7 +1564,7 @@ static const void *me4000_find_boardinfo(struct comedi_device *dev,
 }
 
 static int me4000_auto_attach(struct comedi_device *dev,
-					unsigned long context_unused)
+			      const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	const struct me4000_board *thisboard;
@@ -1729,9 +1729,9 @@ static struct comedi_driver me4000_driver = {
 };
 
 static int me4000_pci_probe(struct pci_dev *dev,
-				      const struct pci_device_id *ent)
+			    const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &me4000_driver);
+	return comedi_pci_auto_config(dev, &me4000_driver, id);
 }
 
 static void me4000_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/me_daq.c b/drivers/staging/comedi/drivers/me_daq.c
index ce8e3d3..1c8ffa4 100644
--- a/drivers/staging/comedi/drivers/me_daq.c
+++ b/drivers/staging/comedi/drivers/me_daq.c
@@ -501,7 +501,7 @@ static const void *me_find_boardinfo(struct comedi_device *dev,
 }
 
 static int me_auto_attach(struct comedi_device *dev,
-				    unsigned long context_unused)
+			  const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	const struct me_board *board;
@@ -614,9 +614,9 @@ static struct comedi_driver me_daq_driver = {
 };
 
 static int me_daq_pci_probe(struct pci_dev *dev,
-				      const struct pci_device_id *ent)
+			    const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &me_daq_driver);
+	return comedi_pci_auto_config(dev, &me_daq_driver, id);
 }
 
 static void me_daq_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/ni_6527.c b/drivers/staging/comedi/drivers/ni_6527.c
index 5196b460..187e4c2 100644
--- a/drivers/staging/comedi/drivers/ni_6527.c
+++ b/drivers/staging/comedi/drivers/ni_6527.c
@@ -342,7 +342,7 @@ ni6527_find_boardinfo(struct pci_dev *pcidev)
 }
 
 static int ni6527_auto_attach(struct comedi_device *dev,
-					unsigned long context_unused)
+			      const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	struct ni6527_private *devpriv;
@@ -447,9 +447,9 @@ static struct comedi_driver ni6527_driver = {
 };
 
 static int ni6527_pci_probe(struct pci_dev *dev,
-				      const struct pci_device_id *ent)
+			    const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &ni6527_driver);
+	return comedi_pci_auto_config(dev, &ni6527_driver, id);
 }
 
 static void ni6527_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/ni_65xx.c b/drivers/staging/comedi/drivers/ni_65xx.c
index 2fb4b77..e6caaa9 100644
--- a/drivers/staging/comedi/drivers/ni_65xx.c
+++ b/drivers/staging/comedi/drivers/ni_65xx.c
@@ -611,7 +611,7 @@ ni_65xx_find_boardinfo(struct pci_dev *pcidev)
 }
 
 static int ni_65xx_auto_attach(struct comedi_device *dev,
-					 unsigned long context_unused)
+			       const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	struct ni_65xx_private *devpriv;
@@ -782,9 +782,9 @@ static struct comedi_driver ni_65xx_driver = {
 };
 
 static int ni_65xx_pci_probe(struct pci_dev *dev,
-				       const struct pci_device_id *ent)
+			     const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &ni_65xx_driver);
+	return comedi_pci_auto_config(dev, &ni_65xx_driver, id);
 }
 
 static void ni_65xx_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c
index 26baf9c..4f9124c 100644
--- a/drivers/staging/comedi/drivers/ni_660x.c
+++ b/drivers/staging/comedi/drivers/ni_660x.c
@@ -1167,7 +1167,7 @@ static int ni_660x_dio_insn_config(struct comedi_device *dev,
 }
 
 static int ni_660x_auto_attach(struct comedi_device *dev,
-					 unsigned long context_unused)
+			       const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	const struct ni_660x_board *board;
@@ -1322,9 +1322,9 @@ static struct comedi_driver ni_660x_driver = {
 };
 
 static int ni_660x_pci_probe(struct pci_dev *dev,
-				       const struct pci_device_id *ent)
+			     const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &ni_660x_driver);
+	return comedi_pci_auto_config(dev, &ni_660x_driver, id);
 }
 
 static void ni_660x_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/ni_670x.c b/drivers/staging/comedi/drivers/ni_670x.c
index 272caeb..7f311ae 100644
--- a/drivers/staging/comedi/drivers/ni_670x.c
+++ b/drivers/staging/comedi/drivers/ni_670x.c
@@ -202,7 +202,7 @@ ni_670x_find_boardinfo(struct pci_dev *pcidev)
 }
 
 static int ni_670x_auto_attach(struct comedi_device *dev,
-					 unsigned long context_unused)
+			       const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	const struct ni_670x_board *thisboard;
@@ -304,9 +304,9 @@ static struct comedi_driver ni_670x_driver = {
 };
 
 static int ni_670x_pci_probe(struct pci_dev *dev,
-				       const struct pci_device_id *ent)
+			     const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &ni_670x_driver);
+	return comedi_pci_auto_config(dev, &ni_670x_driver, id);
 }
 
 static void ni_670x_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c
index d29c4d7..4f403ec 100644
--- a/drivers/staging/comedi/drivers/ni_labpc.c
+++ b/drivers/staging/comedi/drivers/ni_labpc.c
@@ -697,7 +697,7 @@ labpc_pci_find_boardinfo(struct pci_dev *pcidev)
 }
 
 static int labpc_auto_attach(struct comedi_device *dev,
-				       unsigned long context_unused)
+			     const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	struct labpc_private *devpriv;
@@ -2111,9 +2111,9 @@ static DEFINE_PCI_DEVICE_TABLE(labpc_pci_table) = {
 MODULE_DEVICE_TABLE(pci, labpc_pci_table);
 
 static int labpc_pci_probe(struct pci_dev *dev,
-				     const struct pci_device_id *ent)
+			   const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &labpc_driver);
+	return comedi_pci_auto_config(dev, &labpc_driver, id);
 }
 
 static void labpc_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/ni_pcidio.c b/drivers/staging/comedi/drivers/ni_pcidio.c
index 084ebea..773def0 100644
--- a/drivers/staging/comedi/drivers/ni_pcidio.c
+++ b/drivers/staging/comedi/drivers/ni_pcidio.c
@@ -1107,7 +1107,7 @@ nidio_find_boardinfo(struct pci_dev *pcidev)
 }
 
 static int nidio_auto_attach(struct comedi_device *dev,
-				       unsigned long context_unused)
+			     const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	struct nidio96_private *devpriv;
@@ -1219,9 +1219,9 @@ static struct comedi_driver ni_pcidio_driver = {
 };
 
 static int ni_pcidio_pci_probe(struct pci_dev *dev,
-					 const struct pci_device_id *ent)
+			       const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &ni_pcidio_driver);
+	return comedi_pci_auto_config(dev, &ni_pcidio_driver, id);
 }
 
 static void ni_pcidio_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/ni_pcimio.c b/drivers/staging/comedi/drivers/ni_pcimio.c
index aaac0b2..f2942b0 100644
--- a/drivers/staging/comedi/drivers/ni_pcimio.c
+++ b/drivers/staging/comedi/drivers/ni_pcimio.c
@@ -1621,7 +1621,7 @@ pcimio_find_boardinfo(struct pci_dev *pcidev)
 }
 
 static int pcimio_auto_attach(struct comedi_device *dev,
-					unsigned long context_unused)
+			      const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	struct ni_private *devpriv;
@@ -1786,9 +1786,9 @@ static struct comedi_driver ni_pcimio_driver = {
 };
 
 static int ni_pcimio_pci_probe(struct pci_dev *dev,
-					 const struct pci_device_id *ent)
+			       const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &ni_pcimio_driver);
+	return comedi_pci_auto_config(dev, &ni_pcimio_driver, id);
 }
 
 static void ni_pcimio_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/rtd520.c b/drivers/staging/comedi/drivers/rtd520.c
index 8d7c948..134a008 100644
--- a/drivers/staging/comedi/drivers/rtd520.c
+++ b/drivers/staging/comedi/drivers/rtd520.c
@@ -1273,7 +1273,7 @@ static const void *rtd_find_boardinfo(struct comedi_device *dev,
 }
 
 static int rtd_auto_attach(struct comedi_device *dev,
-				     unsigned long context_unused)
+			   const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	const struct rtdBoard *thisboard;
@@ -1415,9 +1415,9 @@ static struct comedi_driver rtd520_driver = {
 };
 
 static int rtd520_pci_probe(struct pci_dev *dev,
-				      const struct pci_device_id *ent)
+			    const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &rtd520_driver);
+	return comedi_pci_auto_config(dev, &rtd520_driver, id);
 }
 
 static void rtd520_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c
index 6dc1d28..d26a0df 100644
--- a/drivers/staging/comedi/drivers/s626.c
+++ b/drivers/staging/comedi/drivers/s626.c
@@ -2658,7 +2658,7 @@ static void s626_initialize(struct comedi_device *dev)
 }
 
 static int s626_auto_attach(struct comedi_device *dev,
-				      unsigned long context_unused)
+			    const void *context_unused)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	struct s626_private *devpriv;
@@ -2831,9 +2831,9 @@ static struct comedi_driver s626_driver = {
 };
 
 static int s626_pci_probe(struct pci_dev *dev,
-				    const struct pci_device_id *ent)
+			  const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &s626_driver);
+	return comedi_pci_auto_config(dev, &s626_driver, id);
 }
 
 static void s626_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/skel.c b/drivers/staging/comedi/drivers/skel.c
index e2d7970..1e3c121 100644
--- a/drivers/staging/comedi/drivers/skel.c
+++ b/drivers/staging/comedi/drivers/skel.c
@@ -547,7 +547,7 @@ static int skel_attach(struct comedi_device *dev, struct comedi_devconfig *it)
  * comedi_auto_config().
  */
 static int skel_auto_attach(struct comedi_device *dev,
-				      unsigned long context)
+			    const void *context)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
 	const struct skel_board *thisboard;
@@ -702,9 +702,9 @@ static DEFINE_PCI_DEVICE_TABLE(skel_pci_table) = {
 MODULE_DEVICE_TABLE(pci, skel_pci_table);
 
 static int skel_pci_probe(struct pci_dev *dev,
-					   const struct pci_device_id *ent)
+			  const struct pci_device_id *id)
 {
-	return comedi_pci_auto_config(dev, &skel_driver);
+	return comedi_pci_auto_config(dev, &skel_driver, id);
 }
 
 static void skel_pci_remove(struct pci_dev *dev)
diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c
index 17b45eb..8d9cbef 100644
--- a/drivers/staging/comedi/drivers/usbdux.c
+++ b/drivers/staging/comedi/drivers/usbdux.c
@@ -274,6 +274,7 @@ struct usbduxsub {
 	int ifnum;
 	/* interface structure in 2.6 */
 	struct usb_interface *interface;
+	const struct usb_device_id *id;
 	/* comedi device for the interrupt context */
 	struct comedi_device *comedidev;
 	/* is it USB_SPEED_HIGH or not? */
@@ -2320,7 +2321,7 @@ static int usbdux_attach_common(struct comedi_device *dev,
 }
 
 static int usbdux_auto_attach(struct comedi_device *dev,
-			      unsigned long context_unused)
+			      const void *context_unused)
 {
 	struct usb_interface *uinterf = comedi_to_usb_interface(dev);
 	int ret;
@@ -2369,6 +2370,7 @@ static void usbdux_firmware_request_complete_handler(const struct firmware *fw,
 {
 	struct usbduxsub *usbduxsub_tmp = context;
 	struct usb_interface *uinterf = usbduxsub_tmp->interface;
+	const struct usb_device_id *id = usbduxsub_tmp->id;
 	int ret;
 
 	if (fw == NULL) {
@@ -2388,7 +2390,7 @@ static void usbdux_firmware_request_complete_handler(const struct firmware *fw,
 			"Could not upload firmware (err=%d)\n", ret);
 		goto out;
 	}
-	comedi_usb_auto_config(uinterf, &usbdux_driver);
+	comedi_usb_auto_config(uinterf, &usbdux_driver, id);
  out:
 	release_firmware(fw);
 }
@@ -2430,6 +2432,7 @@ static int usbdux_usb_probe(struct usb_interface *uinterf,
 
 	/* 2.6: save the interface itself */
 	usbduxsub[index].interface = uinterf;
+	usbduxsub[index].id = id;
 	/* get the interface number from the interface */
 	usbduxsub[index].ifnum = uinterf->altsetting->desc.bInterfaceNumber;
 	/* hand the private data over to the usb subsystem */
diff --git a/drivers/staging/comedi/drivers/usbduxfast.c b/drivers/staging/comedi/drivers/usbduxfast.c
index 4e19f61..e9b9217 100644
--- a/drivers/staging/comedi/drivers/usbduxfast.c
+++ b/drivers/staging/comedi/drivers/usbduxfast.c
@@ -170,6 +170,7 @@ struct usbduxfastsub_s {
 	int16_t *insnBuffer;	/* input buffer for single insn */
 	int ifnum;		/* interface number */
 	struct usb_interface *interface;	/* interface structure */
+	const struct usb_device_id *id;
 	/* comedi device for the interrupt context */
 	struct comedi_device *comedidev;
 	short int ai_cmd_running;	/* asynchronous command is running */
@@ -1423,7 +1424,7 @@ static int usbduxfast_attach_common(struct comedi_device *dev,
 }
 
 static int usbduxfast_auto_attach(struct comedi_device *dev,
-				  unsigned long context_unused)
+				  const void *context_unused)
 {
 	struct usb_interface *uinterf = comedi_to_usb_interface(dev);
 	int ret;
@@ -1473,6 +1474,7 @@ static void usbduxfast_firmware_request_complete_handler(const struct firmware
 {
 	struct usbduxfastsub_s *usbduxfastsub_tmp = context;
 	struct usb_interface *uinterf = usbduxfastsub_tmp->interface;
+	const struct usb_device_id *id = usbduxfastsub_tmp->id;
 	int ret;
 
 	if (fw == NULL)
@@ -1490,7 +1492,7 @@ static void usbduxfast_firmware_request_complete_handler(const struct firmware
 		goto out;
 	}
 
-	comedi_usb_auto_config(uinterf, &usbduxfast_driver);
+	comedi_usb_auto_config(uinterf, &usbduxfast_driver, id);
  out:
 	release_firmware(fw);
 }
@@ -1540,6 +1542,7 @@ static int usbduxfast_usb_probe(struct usb_interface *uinterf,
 
 	/* save the interface itself */
 	usbduxfastsub[index].interface = uinterf;
+	usbduxfastsub[index].id = id;
 	/* get the interface number from the interface */
 	usbduxfastsub[index].ifnum = uinterf->altsetting->desc.bInterfaceNumber;
 	/*
diff --git a/drivers/staging/comedi/drivers/usbduxsigma.c b/drivers/staging/comedi/drivers/usbduxsigma.c
index cdd279b..901b9aa 100644
--- a/drivers/staging/comedi/drivers/usbduxsigma.c
+++ b/drivers/staging/comedi/drivers/usbduxsigma.c
@@ -222,6 +222,7 @@ struct usbduxsub {
 	int ifnum;
 	/* interface structure in 2.6 */
 	struct usb_interface *interface;
+	const struct usb_device_id *id;
 	/* comedi device for the interrupt context */
 	struct comedi_device *comedidev;
 	/* is it USB_SPEED_HIGH or not? */
@@ -2307,7 +2308,7 @@ static int usbduxsigma_attach_common(struct comedi_device *dev,
 }
 
 static int usbduxsigma_auto_attach(struct comedi_device *dev,
-				   unsigned long context_unused)
+				   const void *context_unused)
 {
 	struct usb_interface *uinterf = comedi_to_usb_interface(dev);
 	int ret;
@@ -2355,6 +2356,7 @@ static void usbdux_firmware_request_complete_handler(const struct firmware *fw,
 {
 	struct usbduxsub *usbduxsub_tmp = context;
 	struct usb_interface *uinterf = usbduxsub_tmp->interface;
+	const struct usb_device_id *id = usbduxsub_tmp->id;
 	int ret;
 
 	if (fw == NULL) {
@@ -2374,7 +2376,7 @@ static void usbdux_firmware_request_complete_handler(const struct firmware *fw,
 			"Could not upload firmware (err=%d)\n", ret);
 		goto out;
 	}
-	comedi_usb_auto_config(uinterf, &usbduxsigma_driver);
+	comedi_usb_auto_config(uinterf, &usbduxsigma_driver, id);
 out:
 	release_firmware(fw);
 }
@@ -2416,6 +2418,7 @@ static int usbduxsigma_usb_probe(struct usb_interface *uinterf,
 
 	/* save the interface itself */
 	usbduxsub[index].interface = uinterf;
+	usbduxsub[index].id = id;
 	/* get the interface number from the interface */
 	usbduxsub[index].ifnum = uinterf->altsetting->desc.bInterfaceNumber;
 	/* hand the private data over to the usb subsystem */
diff --git a/drivers/staging/comedi/drivers/vmk80xx.c b/drivers/staging/comedi/drivers/vmk80xx.c
index 609dc69..103000f 100644
--- a/drivers/staging/comedi/drivers/vmk80xx.c
+++ b/drivers/staging/comedi/drivers/vmk80xx.c
@@ -1210,7 +1210,7 @@ static int vmk80xx_attach(struct comedi_device *cdev,
 
 /* called via comedi_usb_auto_config() */
 static int vmk80xx_auto_attach(struct comedi_device *cdev,
-			       unsigned long context_unused)
+			       const void *context_unused)
 {
 	struct usb_interface *intf = comedi_to_usb_interface(cdev);
 	int i;
@@ -1392,7 +1392,7 @@ static int vmk80xx_usb_probe(struct usb_interface *intf,
 
 	mutex_unlock(&glb_mutex);
 
-	comedi_usb_auto_config(intf, &vmk80xx_driver);
+	comedi_usb_auto_config(intf, &vmk80xx_driver, id);
 
 	return 0;
 error:
-- 
1.7.11

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux