int comedi_alloc_subdevice_minor(struct comedi_device *dev,
struct comedi_subdevice *s);
void comedi_free_subdevice_minor(struct comedi_subdevice *s);
-int comedi_pci_auto_config(struct pci_dev *pcidev, const char *board_name);
+int comedi_pci_auto_config(struct pci_dev *pcidev,
+ struct comedi_driver *driver);
void comedi_pci_auto_unconfig(struct pci_dev *pcidev);
struct usb_device; /* forward declaration */
-int comedi_usb_auto_config(struct usb_device *usbdev, const char *board_name);
+int comedi_usb_auto_config(struct usb_device *usbdev,
+ struct comedi_driver *driver);
void comedi_usb_auto_unconfig(struct usb_device *usbdev);
#ifdef CONFIG_COMEDI_PCI_DRIVERS
kfree(minor);
}
-int comedi_pci_auto_config(struct pci_dev *pcidev, const char *board_name)
+int comedi_pci_auto_config(struct pci_dev *pcidev, struct comedi_driver *driver)
{
int options[2];
/* pci slot */
options[1] = PCI_SLOT(pcidev->devfn);
- return comedi_auto_config(&pcidev->dev, board_name,
+ return comedi_auto_config(&pcidev->dev, driver->driver_name,
options, ARRAY_SIZE(options));
}
EXPORT_SYMBOL_GPL(comedi_pci_auto_config);
}
EXPORT_SYMBOL_GPL(comedi_pci_auto_unconfig);
-int comedi_usb_auto_config(struct usb_device *usbdev, const char *board_name)
+int comedi_usb_auto_config(struct usb_device *usbdev,
+ struct comedi_driver *driver)
{
BUG_ON(usbdev == NULL);
- return comedi_auto_config(&usbdev->dev, board_name, NULL, 0);
+ return comedi_auto_config(&usbdev->dev, driver->driver_name, NULL, 0);
}
EXPORT_SYMBOL_GPL(comedi_usb_auto_config);
static int __devinit driver_addi_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_addi.driver_name);
+ return comedi_pci_auto_config(dev, &driver_addi);
}
static void __devexit driver_addi_pci_remove(struct pci_dev *dev)
static int __devinit driver_pci6208_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_pci6208.driver_name);
+ return comedi_pci_auto_config(dev, &driver_pci6208);
}
static void __devexit driver_pci6208_pci_remove(struct pci_dev *dev)
const struct pci_device_id
*ent)
{
- return comedi_pci_auto_config(dev, driver_adl_pci7230.driver_name);
+ return comedi_pci_auto_config(dev, &driver_adl_pci7230);
}
static void __devexit driver_adl_pci7230_pci_remove(struct pci_dev *dev)
const struct pci_device_id
*ent)
{
- return comedi_pci_auto_config(dev, driver_adl_pci7296.driver_name);
+ return comedi_pci_auto_config(dev, &driver_adl_pci7296);
}
static void __devexit driver_adl_pci7296_pci_remove(struct pci_dev *dev)
const struct pci_device_id
*ent)
{
- return comedi_pci_auto_config(dev, driver_adl_pci7432.driver_name);
+ return comedi_pci_auto_config(dev, &driver_adl_pci7432);
}
static void __devexit driver_adl_pci7432_pci_remove(struct pci_dev *dev)
const struct pci_device_id
*ent)
{
- return comedi_pci_auto_config(dev, driver_adl_pci8164.driver_name);
+ return comedi_pci_auto_config(dev, &driver_adl_pci8164);
}
static void __devexit driver_adl_pci8164_pci_remove(struct pci_dev *dev)
static int __devinit pci9111_driver_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, pci9111_driver.driver_name);
+ return comedi_pci_auto_config(dev, &pci9111_driver);
}
static void __devexit pci9111_driver_pci_remove(struct pci_dev *dev)
static int __devinit driver_pci9118_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_pci9118.driver_name);
+ return comedi_pci_auto_config(dev, &driver_pci9118);
}
static void __devexit driver_pci9118_pci_remove(struct pci_dev *dev)
static int __devinit driver_pci1710_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_pci1710.driver_name);
+ return comedi_pci_auto_config(dev, &driver_pci1710);
}
static void __devexit driver_pci1710_pci_remove(struct pci_dev *dev)
static int __devinit driver_pci1723_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_pci1723.driver_name);
+ return comedi_pci_auto_config(dev, &driver_pci1723);
}
static void __devexit driver_pci1723_pci_remove(struct pci_dev *dev)
static int __devinit driver_pci_dio_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_pci_dio.driver_name);
+ return comedi_pci_auto_config(dev, &driver_pci_dio);
}
static void __devexit driver_pci_dio_pci_remove(struct pci_dev *dev)
const struct pci_device_id
*ent)
{
- return comedi_pci_auto_config(dev, driver_amplc_dio200.driver_name);
+ return comedi_pci_auto_config(dev, &driver_amplc_dio200);
}
static void __devexit driver_amplc_dio200_pci_remove(struct pci_dev *dev)
const struct pci_device_id
*ent)
{
- return comedi_pci_auto_config(dev, driver_amplc_pc236.driver_name);
+ return comedi_pci_auto_config(dev, &driver_amplc_pc236);
}
static void __devexit driver_amplc_pc236_pci_remove(struct pci_dev *dev)
const struct pci_device_id
*ent)
{
- return comedi_pci_auto_config(dev, driver_amplc_pc263.driver_name);
+ return comedi_pci_auto_config(dev, &driver_amplc_pc263);
}
static void __devexit driver_amplc_pc263_pci_remove(struct pci_dev *dev)
const struct pci_device_id
*ent)
{
- return comedi_pci_auto_config(dev, driver_amplc_pci224.driver_name);
+ return comedi_pci_auto_config(dev, &driver_amplc_pci224);
}
static void __devexit driver_amplc_pci224_pci_remove(struct pci_dev *dev)
const struct pci_device_id
*ent)
{
- return comedi_pci_auto_config(dev, driver_amplc_pci230.driver_name);
+ return comedi_pci_auto_config(dev, &driver_amplc_pci230);
}
static void __devexit driver_amplc_pci230_pci_remove(struct pci_dev *dev)
static int __devinit driver_cb_pcidas_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_cb_pcidas.driver_name);
+ return comedi_pci_auto_config(dev, &driver_cb_pcidas);
}
static void __devexit driver_cb_pcidas_pci_remove(struct pci_dev *dev)
static int __devinit driver_cb_pcidas_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_cb_pcidas.driver_name);
+ return comedi_pci_auto_config(dev, &driver_cb_pcidas);
}
static void __devexit driver_cb_pcidas_pci_remove(struct pci_dev *dev)
static int __devinit driver_cb_pcidda_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_cb_pcidda.driver_name);
+ return comedi_pci_auto_config(dev, &driver_cb_pcidda);
}
static void __devexit driver_cb_pcidda_pci_remove(struct pci_dev *dev)
static int __devinit driver_cb_pcidio_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_cb_pcidio.driver_name);
+ return comedi_pci_auto_config(dev, &driver_cb_pcidio);
}
static void __devexit driver_cb_pcidio_pci_remove(struct pci_dev *dev)
const struct pci_device_id
*ent)
{
- return comedi_pci_auto_config(dev, driver_cb_pcimdas.driver_name);
+ return comedi_pci_auto_config(dev, &driver_cb_pcimdas);
}
static void __devexit driver_cb_pcimdas_pci_remove(struct pci_dev *dev)
const struct pci_device_id
*ent)
{
- return comedi_pci_auto_config(dev, cb_pcimdda_driver.driver_name);
+ return comedi_pci_auto_config(dev, &cb_pcimdda_driver);
}
static void __devexit cb_pcimdda_driver_pci_remove(struct pci_dev *dev)
static int __devinit driver_contec_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_contec.driver_name);
+ return comedi_pci_auto_config(dev, &driver_contec);
}
static void __devexit driver_contec_pci_remove(struct pci_dev *dev)
const struct pci_device_id
*ent)
{
- return comedi_pci_auto_config(dev, driver_daqboard2000.driver_name);
+ return comedi_pci_auto_config(dev, &driver_daqboard2000);
}
static void __devexit driver_daqboard2000_pci_remove(struct pci_dev *dev)
static int __devinit driver_das08_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_das08.driver_name);
+ return comedi_pci_auto_config(dev, &driver_das08);
}
static void __devexit driver_das08_pci_remove(struct pci_dev *dev)
static int __devinit driver_dt3000_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_dt3000.driver_name);
+ return comedi_pci_auto_config(dev, &driver_dt3000);
}
static void __devexit driver_dt3000_pci_remove(struct pci_dev *dev)
static int __devinit driver_dyna_pci10xx_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_dyna_pci10xx.driver_name);
+ return comedi_pci_auto_config(dev, &driver_dyna_pci10xx);
}
static void __devexit driver_dyna_pci10xx_pci_remove(struct pci_dev *dev)
static int __devinit driver_hpdi_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_hpdi.driver_name);
+ return comedi_pci_auto_config(dev, &driver_hpdi);
}
static void __devexit driver_hpdi_pci_remove(struct pci_dev *dev)
static int __devinit driver_jr3_pci_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_jr3_pci.driver_name);
+ return comedi_pci_auto_config(dev, &driver_jr3_pci);
}
static void __devexit driver_jr3_pci_pci_remove(struct pci_dev *dev)
static int __devinit cnt_driver_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, cnt_driver.driver_name);
+ return comedi_pci_auto_config(dev, &cnt_driver);
}
static void __devexit cnt_driver_pci_remove(struct pci_dev *dev)
static int __devinit driver_me4000_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_me4000.driver_name);
+ return comedi_pci_auto_config(dev, &driver_me4000);
}
static void __devexit driver_me4000_pci_remove(struct pci_dev *dev)
static int __devinit me_driver_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, me_driver.driver_name);
+ return comedi_pci_auto_config(dev, &me_driver);
}
static void __devexit me_driver_pci_remove(struct pci_dev *dev)
static int __devinit driver_ni6527_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_ni6527.driver_name);
+ return comedi_pci_auto_config(dev, &driver_ni6527);
}
static void __devexit driver_ni6527_pci_remove(struct pci_dev *dev)
static int __devinit driver_ni_65xx_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_ni_65xx.driver_name);
+ return comedi_pci_auto_config(dev, &driver_ni_65xx);
}
static void __devexit driver_ni_65xx_pci_remove(struct pci_dev *dev)
static int __devinit driver_ni_660x_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_ni_660x.driver_name);
+ return comedi_pci_auto_config(dev, &driver_ni_660x);
}
static void __devexit driver_ni_660x_pci_remove(struct pci_dev *dev)
static int __devinit driver_ni_670x_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_ni_670x.driver_name);
+ return comedi_pci_auto_config(dev, &driver_ni_670x);
}
static void __devexit driver_ni_670x_pci_remove(struct pci_dev *dev)
static int __devinit driver_labpc_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_labpc.driver_name);
+ return comedi_pci_auto_config(dev, &driver_labpc);
}
static void __devexit driver_labpc_pci_remove(struct pci_dev *dev)
static int __devinit driver_pcidio_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_pcidio.driver_name);
+ return comedi_pci_auto_config(dev, &driver_pcidio);
}
static void __devexit driver_pcidio_pci_remove(struct pci_dev *dev)
static int __devinit driver_pcimio_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_pcimio.driver_name);
+ return comedi_pci_auto_config(dev, &driver_pcimio);
}
static void __devexit driver_pcimio_pci_remove(struct pci_dev *dev)
static int __devinit rtd520Driver_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, rtd520Driver.driver_name);
+ return comedi_pci_auto_config(dev, &rtd520Driver);
}
static void __devexit rtd520Driver_pci_remove(struct pci_dev *dev)
static int __devinit driver_s626_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_s626.driver_name);
+ return comedi_pci_auto_config(dev, &driver_s626);
}
static void __devexit driver_s626_pci_remove(struct pci_dev *dev)
static int __devinit driver_skel_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
- return comedi_pci_auto_config(dev, driver_skel.driver_name);
+ return comedi_pci_auto_config(dev, &driver_skel);
}
static void __devexit driver_skel_pci_remove(struct pci_dev *dev)
static DEFINE_SEMAPHORE(start_stop_sem);
+static struct comedi_driver driver_usbdux; /* see below for initializer */
+
/*
* Stops the data acquision
* It should be safe to call this function from any context
"Could not upload firmware (err=%d)\n", ret);
goto out;
}
- comedi_usb_auto_config(usbdev, BOARDNAME);
+ comedi_usb_auto_config(usbdev, &driver_usbdux);
out:
release_firmware(fw);
}
static DEFINE_SEMAPHORE(start_stop_sem);
+static struct comedi_driver driver_usbduxfast; /* see below for initializer */
+
/*
* bulk transfers to usbduxfast
*/
goto out;
}
- comedi_usb_auto_config(usbdev, BOARDNAME);
+ comedi_usb_auto_config(usbdev, &driver_usbduxfast);
out:
release_firmware(fw);
}
static DEFINE_SEMAPHORE(start_stop_sem);
+static struct comedi_driver driver_usbduxsigma; /* see below for initializer */
+
/*
* Stops the data acquision
* It should be safe to call this function from any context
"Could not upload firmware (err=%d)\n", ret);
goto out;
}
- comedi_usb_auto_config(usbdev, BOARDNAME);
+ comedi_usb_auto_config(usbdev, &driver_usbduxsigma);
out:
release_firmware(fw);
}
static DEFINE_MUTEX(glb_mutex);
+static struct comedi_driver driver_vmk80xx; /* see below for initializer */
+
static void vmk80xx_tx_callback(struct urb *urb)
{
struct vmk80xx_usb *dev = urb->context;
mutex_unlock(&glb_mutex);
- comedi_usb_auto_config(dev->udev, BOARDNAME);
+ comedi_usb_auto_config(dev->udev, &driver_vmk80xx);
return 0;
error: