Commit 20a22b70 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: addi_apci_*: add module_comedi_pci_driver()

Pull the module init code out of addi_common.c and add it to
each addi-data driver. Rename the data and functions so they
have namespace associated with the drivers.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c33ef61f
...@@ -107,7 +107,6 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -107,7 +107,6 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it)
v_pci_card_list_init(this_board->i_VendorId, 1); /* 1 for displaying the list.. */ v_pci_card_list_init(this_board->i_VendorId, 1); /* 1 for displaying the list.. */
pci_list_builded = 1; pci_list_builded = 1;
} }
/* printk("comedi%d: "ADDIDATA_DRIVER_NAME": board=%s",dev->minor,this_board->pc_DriverName); */
if ((this_board->i_Dma) && (it->options[2] == 0)) { if ((this_board->i_Dma) && (it->options[2] == 0)) {
i_Dma = 1; i_Dma = 1;
...@@ -466,32 +465,3 @@ static void i_ADDI_Detach(struct comedi_device *dev) ...@@ -466,32 +465,3 @@ static void i_ADDI_Detach(struct comedi_device *dev)
} }
} }
} }
static struct comedi_driver addi_driver = {
.driver_name = ADDIDATA_DRIVER_NAME,
.module = THIS_MODULE,
.attach = i_ADDI_Attach,
.detach = i_ADDI_Detach,
.num_names = ARRAY_SIZE(boardtypes),
.board_name = &boardtypes[0].pc_DriverName,
.offset = sizeof(struct addi_board),
};
static int __devinit addi_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
return comedi_pci_auto_config(dev, &addi_driver);
}
static void __devexit addi_pci_remove(struct pci_dev *dev)
{
comedi_pci_auto_unconfig(dev);
}
static struct pci_driver addi_pci_driver = {
.name = ADDIDATA_DRIVER_NAME,
.id_table = addi_apci_tbl,
.probe = &addi_pci_probe,
.remove = __devexit_p(&addi_pci_remove),
};
module_comedi_pci_driver(addi_driver, addi_pci_driver);
...@@ -6,12 +6,11 @@ ...@@ -6,12 +6,11 @@
#define ADDIDATA_WATCHDOG 2 /* Or shold it be something else */ #define ADDIDATA_WATCHDOG 2 /* Or shold it be something else */
#define ADDIDATA_DRIVER_NAME "addi_apci_035"
#include "addi-data/addi_eeprom.c" #include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci035.c" #include "addi-data/hwdrv_apci035.c"
#include "addi-data/addi_common.c"
static const struct addi_board boardtypes[] = { static const struct addi_board apci035_boardtypes[] = {
{ {
.pc_DriverName = "apci035", .pc_DriverName = "apci035",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA, .i_VendorId = PCI_VENDOR_ID_ADDIDATA,
...@@ -38,13 +37,40 @@ static const struct addi_board boardtypes[] = { ...@@ -38,13 +37,40 @@ static const struct addi_board boardtypes[] = {
}, },
}; };
static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { static struct comedi_driver apci035_driver = {
.driver_name = "addi_apci_035",
.module = THIS_MODULE,
.attach = i_ADDI_Attach,
.detach = i_ADDI_Detach,
.num_names = ARRAY_SIZE(apci035_boardtypes),
.board_name = &apci035_boardtypes[0].pc_DriverName,
.offset = sizeof(struct addi_board),
};
static int __devinit apci035_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
return comedi_pci_auto_config(dev, &apci035_driver);
}
static void __devexit apci035_pci_remove(struct pci_dev *dev)
{
comedi_pci_auto_unconfig(dev);
}
static DEFINE_PCI_DEVICE_TABLE(apci035_pci_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x0300) }, { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x0300) },
{ 0 } { 0 }
}; };
MODULE_DEVICE_TABLE(pci, addi_apci_tbl); MODULE_DEVICE_TABLE(pci, apci035_pci_table);
#include "addi-data/addi_common.c" static struct pci_driver apci035_pci_driver = {
.name = "addi_apci_035",
.id_table = apci035_pci_table,
.probe = apci035_pci_probe,
.remove = __devexit_p(apci035_pci_remove),
};
module_comedi_pci_driver(apci035_driver, apci035_pci_driver);
MODULE_AUTHOR("Comedi http://www.comedi.org"); MODULE_AUTHOR("Comedi http://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver"); MODULE_DESCRIPTION("Comedi low-level driver");
......
...@@ -4,12 +4,11 @@ ...@@ -4,12 +4,11 @@
#include "addi-data/addi_common.h" #include "addi-data/addi_common.h"
#include "addi-data/addi_amcc_s5933.h" #include "addi-data/addi_amcc_s5933.h"
#define ADDIDATA_DRIVER_NAME "addi_apci_1032"
#include "addi-data/addi_eeprom.c" #include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci1032.c" #include "addi-data/hwdrv_apci1032.c"
#include "addi-data/addi_common.c"
static const struct addi_board boardtypes[] = { static const struct addi_board apci1032_boardtypes[] = {
{ {
.pc_DriverName = "apci1032", .pc_DriverName = "apci1032",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA, .i_VendorId = PCI_VENDOR_ID_ADDIDATA,
...@@ -27,13 +26,40 @@ static const struct addi_board boardtypes[] = { ...@@ -27,13 +26,40 @@ static const struct addi_board boardtypes[] = {
}, },
}; };
static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { static struct comedi_driver apci1032_driver = {
.driver_name = "addi_apci_1032",
.module = THIS_MODULE,
.attach = i_ADDI_Attach,
.detach = i_ADDI_Detach,
.num_names = ARRAY_SIZE(apci1032_boardtypes),
.board_name = &apci1032_boardtypes[0].pc_DriverName,
.offset = sizeof(struct addi_board),
};
static int __devinit apci1032_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
return comedi_pci_auto_config(dev, &apci1032_driver);
}
static void __devexit apci1032_pci_remove(struct pci_dev *dev)
{
comedi_pci_auto_unconfig(dev);
}
static DEFINE_PCI_DEVICE_TABLE(apci1032_pci_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1003) }, { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1003) },
{ 0 } { 0 }
}; };
MODULE_DEVICE_TABLE(pci, addi_apci_tbl); MODULE_DEVICE_TABLE(pci, apci1032_pci_table);
#include "addi-data/addi_common.c" static struct pci_driver apci1032_pci_driver = {
.name = "addi_apci_1032",
.id_table = apci1032_pci_table,
.probe = apci1032_pci_probe,
.remove = __devexit_p(apci1032_pci_remove),
};
module_comedi_pci_driver(apci1032_driver, apci1032_pci_driver);
MODULE_AUTHOR("Comedi http://www.comedi.org"); MODULE_AUTHOR("Comedi http://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver"); MODULE_DESCRIPTION("Comedi low-level driver");
......
...@@ -4,12 +4,11 @@ ...@@ -4,12 +4,11 @@
#include "addi-data/addi_common.h" #include "addi-data/addi_common.h"
#include "addi-data/addi_amcc_s5933.h" #include "addi-data/addi_amcc_s5933.h"
#define ADDIDATA_DRIVER_NAME "addi_apci_1500"
#include "addi-data/addi_eeprom.c" #include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci1500.c" #include "addi-data/hwdrv_apci1500.c"
#include "addi-data/addi_common.c"
static const struct addi_board boardtypes[] = { static const struct addi_board apci1500_boardtypes[] = {
{ {
.pc_DriverName = "apci1500", .pc_DriverName = "apci1500",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA_OLD, .i_VendorId = PCI_VENDOR_ID_ADDIDATA_OLD,
...@@ -38,13 +37,40 @@ static const struct addi_board boardtypes[] = { ...@@ -38,13 +37,40 @@ static const struct addi_board boardtypes[] = {
}, },
}; };
static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { static struct comedi_driver apci1500_driver = {
.driver_name = "addi_apci_1500",
.module = THIS_MODULE,
.attach = i_ADDI_Attach,
.detach = i_ADDI_Detach,
.num_names = ARRAY_SIZE(apci1500_boardtypes),
.board_name = &apci1500_boardtypes[0].pc_DriverName,
.offset = sizeof(struct addi_board),
};
static int __devinit apci1500_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
return comedi_pci_auto_config(dev, &apci1500_driver);
}
static void __devexit apci1500_pci_remove(struct pci_dev *dev)
{
comedi_pci_auto_unconfig(dev);
}
static DEFINE_PCI_DEVICE_TABLE(apci1500_pci_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA_OLD, 0x80fc) }, { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA_OLD, 0x80fc) },
{ 0 } { 0 }
}; };
MODULE_DEVICE_TABLE(pci, addi_apci_tbl); MODULE_DEVICE_TABLE(pci, apci1500_pci_table);
#include "addi-data/addi_common.c" static struct pci_driver apci1500_pci_driver = {
.name = "addi_apci_1500",
.id_table = apci1500_pci_table,
.probe = apci1500_pci_probe,
.remove = __devexit_p(apci1500_pci_remove),
};
module_comedi_pci_driver(apci1500_driver, apci1500_pci_driver);
MODULE_AUTHOR("Comedi http://www.comedi.org"); MODULE_AUTHOR("Comedi http://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver"); MODULE_DESCRIPTION("Comedi low-level driver");
......
...@@ -4,12 +4,11 @@ ...@@ -4,12 +4,11 @@
#include "addi-data/addi_common.h" #include "addi-data/addi_common.h"
#include "addi-data/addi_amcc_s5933.h" #include "addi-data/addi_amcc_s5933.h"
#define ADDIDATA_DRIVER_NAME "addi_apci_1516"
#include "addi-data/addi_eeprom.c" #include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci1516.c" #include "addi-data/hwdrv_apci1516.c"
#include "addi-data/addi_common.c"
static const struct addi_board boardtypes[] = { static const struct addi_board apci1516_boardtypes[] = {
{ {
.pc_DriverName = "apci1516", .pc_DriverName = "apci1516",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA, .i_VendorId = PCI_VENDOR_ID_ADDIDATA,
...@@ -34,13 +33,40 @@ static const struct addi_board boardtypes[] = { ...@@ -34,13 +33,40 @@ static const struct addi_board boardtypes[] = {
}, },
}; };
static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { static struct comedi_driver apci1516_driver = {
.driver_name = "addi_apci_1516",
.module = THIS_MODULE,
.attach = i_ADDI_Attach,
.detach = i_ADDI_Detach,
.num_names = ARRAY_SIZE(apci1516_boardtypes),
.board_name = &apci1516_boardtypes[0].pc_DriverName,
.offset = sizeof(struct addi_board),
};
static int __devinit apci1516_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
return comedi_pci_auto_config(dev, &apci1516_driver);
}
static void __devexit apci1516_pci_remove(struct pci_dev *dev)
{
comedi_pci_auto_unconfig(dev);
}
static DEFINE_PCI_DEVICE_TABLE(apci1516_pci_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1001) }, { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1001) },
{ 0 } { 0 }
}; };
MODULE_DEVICE_TABLE(pci, addi_apci_tbl); MODULE_DEVICE_TABLE(pci, apci1516_pci_table);
#include "addi-data/addi_common.c" static struct pci_driver apci1516_pci_driver = {
.name = "addi_apci_1516",
.id_table = apci1516_pci_table,
.probe = apci1516_pci_probe,
.remove = __devexit_p(apci1516_pci_remove),
};
module_comedi_pci_driver(apci1516_driver, apci1516_pci_driver);
MODULE_AUTHOR("Comedi http://www.comedi.org"); MODULE_AUTHOR("Comedi http://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver"); MODULE_DESCRIPTION("Comedi low-level driver");
......
...@@ -4,12 +4,11 @@ ...@@ -4,12 +4,11 @@
#include "addi-data/addi_common.h" #include "addi-data/addi_common.h"
#include "addi-data/addi_amcc_s5933.h" #include "addi-data/addi_amcc_s5933.h"
#define ADDIDATA_DRIVER_NAME "addi_apci_1564"
#include "addi-data/addi_eeprom.c" #include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci1564.c" #include "addi-data/hwdrv_apci1564.c"
#include "addi-data/addi_common.c"
static const struct addi_board boardtypes[] = { static const struct addi_board apci1564_boardtypes[] = {
{ {
.pc_DriverName = "apci1564", .pc_DriverName = "apci1564",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA, .i_VendorId = PCI_VENDOR_ID_ADDIDATA,
...@@ -37,13 +36,40 @@ static const struct addi_board boardtypes[] = { ...@@ -37,13 +36,40 @@ static const struct addi_board boardtypes[] = {
}, },
}; };
static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { static struct comedi_driver apci1564_driver = {
.driver_name = "addi_apci_1564",
.module = THIS_MODULE,
.attach = i_ADDI_Attach,
.detach = i_ADDI_Detach,
.num_names = ARRAY_SIZE(apci1564_boardtypes),
.board_name = &apci1564_boardtypes[0].pc_DriverName,
.offset = sizeof(struct addi_board),
};
static int __devinit apci1564_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
return comedi_pci_auto_config(dev, &apci1564_driver);
}
static void __devexit apci1564_pci_remove(struct pci_dev *dev)
{
comedi_pci_auto_unconfig(dev);
}
static DEFINE_PCI_DEVICE_TABLE(apci1564_pci_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1006) }, { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1006) },
{ 0 } { 0 }
}; };
MODULE_DEVICE_TABLE(pci, addi_apci_tbl); MODULE_DEVICE_TABLE(pci, apci1564_pci_table);
#include "addi-data/addi_common.c" static struct pci_driver apci1564_pci_driver = {
.name = "addi_apci_1564",
.id_table = apci1564_pci_table,
.probe = apci1564_pci_probe,
.remove = __devexit_p(apci1564_pci_remove),
};
module_comedi_pci_driver(apci1564_driver, apci1564_pci_driver);
MODULE_AUTHOR("Comedi http://www.comedi.org"); MODULE_AUTHOR("Comedi http://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver"); MODULE_DESCRIPTION("Comedi low-level driver");
......
...@@ -4,12 +4,11 @@ ...@@ -4,12 +4,11 @@
#include "addi-data/addi_common.h" #include "addi-data/addi_common.h"
#include "addi-data/addi_amcc_s5933.h" #include "addi-data/addi_amcc_s5933.h"
#define ADDIDATA_DRIVER_NAME "addi_apci_16xx"
#include "addi-data/addi_eeprom.c" #include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci16xx.c" #include "addi-data/hwdrv_apci16xx.c"
#include "addi-data/addi_common.c"
static const struct addi_board boardtypes[] = { static const struct addi_board apci16xx_boardtypes[] = {
{ {
.pc_DriverName = "apci1648", .pc_DriverName = "apci1648",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA, .i_VendorId = PCI_VENDOR_ID_ADDIDATA,
...@@ -37,14 +36,41 @@ static const struct addi_board boardtypes[] = { ...@@ -37,14 +36,41 @@ static const struct addi_board boardtypes[] = {
}, },
}; };
static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { static struct comedi_driver apci16xx_driver = {
.driver_name = "addi_apci_16xx",
.module = THIS_MODULE,
.attach = i_ADDI_Attach,
.detach = i_ADDI_Detach,
.num_names = ARRAY_SIZE(apci16xx_boardtypes),
.board_name = &apci16xx_boardtypes[0].pc_DriverName,
.offset = sizeof(struct addi_board),
};
static int __devinit apci16xx_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
return comedi_pci_auto_config(dev, &apci16xx_driver);
}
static void __devexit apci16xx_pci_remove(struct pci_dev *dev)
{
comedi_pci_auto_unconfig(dev);
}
static DEFINE_PCI_DEVICE_TABLE(apci16xx_pci_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1009) }, { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1009) },
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x100a) }, { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x100a) },
{ 0 } { 0 }
}; };
MODULE_DEVICE_TABLE(pci, addi_apci_tbl); MODULE_DEVICE_TABLE(pci, apci16xx_pci_table);
#include "addi-data/addi_common.c" static struct pci_driver apci16xx_pci_driver = {
.name = "addi_apci_16xx",
.id_table = apci16xx_pci_table,
.probe = apci16xx_pci_probe,
.remove = __devexit_p(apci16xx_pci_remove),
};
module_comedi_pci_driver(apci16xx_driver, apci16xx_pci_driver);
MODULE_AUTHOR("Comedi http://www.comedi.org"); MODULE_AUTHOR("Comedi http://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver"); MODULE_DESCRIPTION("Comedi low-level driver");
......
...@@ -18,12 +18,11 @@ static void fpu_end(void) ...@@ -18,12 +18,11 @@ static void fpu_end(void)
#define CONFIG_APCI_1710 1 #define CONFIG_APCI_1710 1
#define ADDIDATA_DRIVER_NAME "addi_apci_1710"
#include "addi-data/addi_eeprom.c" #include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_APCI1710.c" #include "addi-data/hwdrv_APCI1710.c"
#include "addi-data/addi_common.c"
static const struct addi_board boardtypes[] = { static const struct addi_board apci1710_boardtypes[] = {
{ {
.pc_DriverName = "apci1710", .pc_DriverName = "apci1710",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA_OLD, .i_VendorId = PCI_VENDOR_ID_ADDIDATA_OLD,
...@@ -37,10 +36,37 @@ static const struct addi_board boardtypes[] = { ...@@ -37,10 +36,37 @@ static const struct addi_board boardtypes[] = {
}, },
}; };
static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { static struct comedi_driver apci1710_driver = {
.driver_name = "addi_apci_1710",
.module = THIS_MODULE,
.attach = i_ADDI_Attach,
.detach = i_ADDI_Detach,
.num_names = ARRAY_SIZE(apci1710_boardtypes),
.board_name = &apci1710_boardtypes[0].pc_DriverName,
.offset = sizeof(struct addi_board),
};
static int __devinit apci1710_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
return comedi_pci_auto_config(dev, &apci1710_driver);
}
static void __devexit apci1710_pci_remove(struct pci_dev *dev)
{
comedi_pci_auto_unconfig(dev);
}
static DEFINE_PCI_DEVICE_TABLE(apci1710_pci_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA_OLD, APCI1710_BOARD_DEVICE_ID) }, { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA_OLD, APCI1710_BOARD_DEVICE_ID) },
{ 0 } { 0 }
}; };
MODULE_DEVICE_TABLE(pci, addi_apci_tbl); MODULE_DEVICE_TABLE(pci, apci1710_pci_table);
#include "addi-data/addi_common.c" static struct pci_driver apci1710_pci_driver = {
.name = "addi_apci_1710",
.id_table = apci1710_pci_table,
.probe = apci1710_pci_probe,
.remove = __devexit_p(apci1710_pci_remove),
};
module_comedi_pci_driver(apci1710_driver, apci1710_pci_driver);
...@@ -4,12 +4,11 @@ ...@@ -4,12 +4,11 @@
#include "addi-data/addi_common.h" #include "addi-data/addi_common.h"
#include "addi-data/addi_amcc_s5933.h" #include "addi-data/addi_amcc_s5933.h"
#define ADDIDATA_DRIVER_NAME "addi_apci_2016"
#include "addi-data/addi_eeprom.c" #include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci2016.c" #include "addi-data/hwdrv_apci2016.c"
#include "addi-data/addi_common.c"
static const struct addi_board boardtypes[] = { static const struct addi_board apci2016_boardtypes[] = {
{ {
.pc_DriverName = "apci2016", .pc_DriverName = "apci2016",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA, .i_VendorId = PCI_VENDOR_ID_ADDIDATA,
...@@ -31,13 +30,40 @@ static const struct addi_board boardtypes[] = { ...@@ -31,13 +30,40 @@ static const struct addi_board boardtypes[] = {
}, },
}; };
static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { static struct comedi_driver apci2016_driver = {
.driver_name = "addi_apci_2016",
.module = THIS_MODULE,
.attach = i_ADDI_Attach,
.detach = i_ADDI_Detach,
.num_names = ARRAY_SIZE(apci2016_boardtypes),
.board_name = &apci2016_boardtypes[0].pc_DriverName,
.offset = sizeof(struct addi_board),
};
static int __devinit apci2016_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
return comedi_pci_auto_config(dev, &apci2016_driver);
}
static void __devexit apci2016_pci_remove(struct pci_dev *dev)
{
comedi_pci_auto_unconfig(dev);
}
static DEFINE_PCI_DEVICE_TABLE(apci2016_pci_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1002) }, { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1002) },
{ 0 } { 0 }
}; };
MODULE_DEVICE_TABLE(pci, addi_apci_tbl); MODULE_DEVICE_TABLE(pci, apci2016_pci_table);
#include "addi-data/addi_common.c" static struct pci_driver apci2016_pci_driver = {
.name = "addi_apci_2016",
.id_table = apci2016_pci_table,
.probe = apci2016_pci_probe,
.remove = __devexit_p(apci2016_pci_remove),
};
module_comedi_pci_driver(apci2016_driver, apci2016_pci_driver);
MODULE_AUTHOR("Comedi http://www.comedi.org"); MODULE_AUTHOR("Comedi http://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver"); MODULE_DESCRIPTION("Comedi low-level driver");
......
...@@ -4,12 +4,11 @@ ...@@ -4,12 +4,11 @@
#include "addi-data/addi_common.h" #include "addi-data/addi_common.h"
#include "addi-data/addi_amcc_s5933.h" #include "addi-data/addi_amcc_s5933.h"
#define ADDIDATA_DRIVER_NAME "addi_apci_2032"
#include "addi-data/addi_eeprom.c" #include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci2032.c" #include "addi-data/hwdrv_apci2032.c"
#include "addi-data/addi_common.c"
static const struct addi_board boardtypes[] = { static const struct addi_board apci2032_boardtypes[] = {
{ {
.pc_DriverName = "apci2032", .pc_DriverName = "apci2032",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA, .i_VendorId = PCI_VENDOR_ID_ADDIDATA,
...@@ -33,13 +32,40 @@ static const struct addi_board boardtypes[] = { ...@@ -33,13 +32,40 @@ static const struct addi_board boardtypes[] = {
}, },
}; };
static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { static struct comedi_driver apci2032_driver = {
.driver_name = "addi_apci_2032",
.module = THIS_MODULE,
.attach = i_ADDI_Attach,
.detach = i_ADDI_Detach,
.num_names = ARRAY_SIZE(apci2032_boardtypes),
.board_name = &apci2032_boardtypes[0].pc_DriverName,
.offset = sizeof(struct addi_board),
};
static int __devinit apci2032_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
return comedi_pci_auto_config(dev, &apci2032_driver);
}
static void __devexit apci2032_pci_remove(struct pci_dev *dev)
{
comedi_pci_auto_unconfig(dev);
}
static DEFINE_PCI_DEVICE_TABLE(apci2032_pci_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1004) }, { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1004) },
{ 0 } { 0 }
}; };
MODULE_DEVICE_TABLE(pci, addi_apci_tbl); MODULE_DEVICE_TABLE(pci, apci2032_pci_table);
#include "addi-data/addi_common.c" static struct pci_driver apci2032_pci_driver = {
.name = "addi_apci_2032",
.id_table = apci2032_pci_table,
.probe = apci2032_pci_probe,
.remove = __devexit_p(apci2032_pci_remove),
};
module_comedi_pci_driver(apci2032_driver, apci2032_pci_driver);
MODULE_AUTHOR("Comedi http://www.comedi.org"); MODULE_AUTHOR("Comedi http://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver"); MODULE_DESCRIPTION("Comedi low-level driver");
......
...@@ -4,12 +4,11 @@ ...@@ -4,12 +4,11 @@
#include "addi-data/addi_common.h" #include "addi-data/addi_common.h"
#include "addi-data/addi_amcc_s5933.h" #include "addi-data/addi_amcc_s5933.h"
#define ADDIDATA_DRIVER_NAME "addi_apci_2200"
#include "addi-data/addi_eeprom.c" #include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci2200.c" #include "addi-data/hwdrv_apci2200.c"
#include "addi-data/addi_common.c"
static const struct addi_board boardtypes[] = { static const struct addi_board apci2200_boardtypes[] = {
{ {
.pc_DriverName = "apci2200", .pc_DriverName = "apci2200",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA, .i_VendorId = PCI_VENDOR_ID_ADDIDATA,
...@@ -33,13 +32,40 @@ static const struct addi_board boardtypes[] = { ...@@ -33,13 +32,40 @@ static const struct addi_board boardtypes[] = {
}, },
}; };
static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { static struct comedi_driver apci2200_driver = {
.driver_name = "addi_apci_2200",
.module = THIS_MODULE,
.attach = i_ADDI_Attach,
.detach = i_ADDI_Detach,
.num_names = ARRAY_SIZE(apci2200_boardtypes),
.board_name = &apci2200_boardtypes[0].pc_DriverName,
.offset = sizeof(struct addi_board),
};
static int __devinit apci2200_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
return comedi_pci_auto_config(dev, &apci2200_driver);
}
static void __devexit apci2200_pci_remove(struct pci_dev *dev)
{
comedi_pci_auto_unconfig(dev);
}
static DEFINE_PCI_DEVICE_TABLE(apci2200_pci_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1005) }, { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1005) },
{ 0 } { 0 }
}; };
MODULE_DEVICE_TABLE(pci, addi_apci_tbl); MODULE_DEVICE_TABLE(pci, apci2200_pci_table);
#include "addi-data/addi_common.c" static struct pci_driver apci2200_pci_driver = {
.name = "addi_apci_2200",
.id_table = apci2200_pci_table,
.probe = apci2200_pci_probe,
.remove = __devexit_p(apci2200_pci_remove),
};
module_comedi_pci_driver(apci2200_driver, apci2200_pci_driver);
MODULE_AUTHOR("Comedi http://www.comedi.org"); MODULE_AUTHOR("Comedi http://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver"); MODULE_DESCRIPTION("Comedi low-level driver");
......
...@@ -4,12 +4,11 @@ ...@@ -4,12 +4,11 @@
#include "addi-data/addi_common.h" #include "addi-data/addi_common.h"
#include "addi-data/addi_amcc_s5933.h" #include "addi-data/addi_amcc_s5933.h"
#define ADDIDATA_DRIVER_NAME "addi_apci_3001"
#include "addi-data/addi_eeprom.c" #include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci3120.c" #include "addi-data/hwdrv_apci3120.c"
#include "addi-data/addi_common.c"
static const struct addi_board boardtypes[] = { static const struct addi_board apci3001_boardtypes[] = {
{ {
.pc_DriverName = "apci3001", .pc_DriverName = "apci3001",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA_OLD, .i_VendorId = PCI_VENDOR_ID_ADDIDATA_OLD,
...@@ -49,13 +48,40 @@ static const struct addi_board boardtypes[] = { ...@@ -49,13 +48,40 @@ static const struct addi_board boardtypes[] = {
}, },
}; };
static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { static struct comedi_driver apci3001_driver = {
.driver_name = "addi_apci_3001",
.module = THIS_MODULE,
.attach = i_ADDI_Attach,
.detach = i_ADDI_Detach,
.num_names = ARRAY_SIZE(apci3001_boardtypes),
.board_name = &apci3001_boardtypes[0].pc_DriverName,
.offset = sizeof(struct addi_board),
};
static int __devinit apci3001_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
return comedi_pci_auto_config(dev, &apci3001_driver);
}
static void __devexit apci3001_pci_remove(struct pci_dev *dev)
{
comedi_pci_auto_unconfig(dev);
}
static DEFINE_PCI_DEVICE_TABLE(apci3001_pci_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA_OLD, 0x828d) }, { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA_OLD, 0x828d) },
{ 0 } { 0 }
}; };
MODULE_DEVICE_TABLE(pci, addi_apci_tbl); MODULE_DEVICE_TABLE(pci, apci3001_pci_table);
#include "addi-data/addi_common.c" static struct pci_driver apci3001_pci_driver = {
.name = "addi_apci_3001",
.id_table = apci3001_pci_table,
.probe = apci3001_pci_probe,
.remove = __devexit_p(apci3001_pci_remove),
};
module_comedi_pci_driver(apci3001_driver, apci3001_pci_driver);
MODULE_AUTHOR("Comedi http://www.comedi.org"); MODULE_AUTHOR("Comedi http://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver"); MODULE_DESCRIPTION("Comedi low-level driver");
......
...@@ -6,12 +6,11 @@ ...@@ -6,12 +6,11 @@
#define CONFIG_APCI_3120 1 #define CONFIG_APCI_3120 1
#define ADDIDATA_DRIVER_NAME "addi_apci_3120"
#include "addi-data/addi_eeprom.c" #include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci3120.c" #include "addi-data/hwdrv_apci3120.c"
#include "addi-data/addi_common.c"
static const struct addi_board boardtypes[] = { static const struct addi_board apci3120_boardtypes[] = {
{ {
.pc_DriverName = "apci3120", .pc_DriverName = "apci3120",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA_OLD, .i_VendorId = PCI_VENDOR_ID_ADDIDATA_OLD,
...@@ -55,13 +54,40 @@ static const struct addi_board boardtypes[] = { ...@@ -55,13 +54,40 @@ static const struct addi_board boardtypes[] = {
}, },
}; };
static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { static struct comedi_driver apci3120_driver = {
.driver_name = "addi_apci_3120",
.module = THIS_MODULE,
.attach = i_ADDI_Attach,
.detach = i_ADDI_Detach,
.num_names = ARRAY_SIZE(apci3120_boardtypes),
.board_name = &apci3120_boardtypes[0].pc_DriverName,
.offset = sizeof(struct addi_board),
};
static int __devinit apci3120_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
return comedi_pci_auto_config(dev, &apci3120_driver);
}
static void __devexit apci3120_pci_remove(struct pci_dev *dev)
{
comedi_pci_auto_unconfig(dev);
}
static DEFINE_PCI_DEVICE_TABLE(apci3120_pci_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA_OLD, 0x818d) }, { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA_OLD, 0x818d) },
{ 0 } { 0 }
}; };
MODULE_DEVICE_TABLE(pci, addi_apci_tbl); MODULE_DEVICE_TABLE(pci, apci3120_pci_table);
#include "addi-data/addi_common.c" static struct pci_driver apci3120_pci_driver = {
.name = "addi_apci_3120",
.id_table = apci3120_pci_table,
.probe = apci3120_pci_probe,
.remove = __devexit_p(apci3120_pci_remove),
};
module_comedi_pci_driver(apci3120_driver, apci3120_pci_driver);
MODULE_AUTHOR("Comedi http://www.comedi.org"); MODULE_AUTHOR("Comedi http://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver"); MODULE_DESCRIPTION("Comedi low-level driver");
......
...@@ -16,12 +16,11 @@ static void fpu_end(void) ...@@ -16,12 +16,11 @@ static void fpu_end(void)
kernel_fpu_end(); kernel_fpu_end();
} }
#define ADDIDATA_DRIVER_NAME "addi_apci_3200"
#include "addi-data/addi_eeprom.c" #include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci3200.c" #include "addi-data/hwdrv_apci3200.c"
#include "addi-data/addi_common.c"
static const struct addi_board boardtypes[] = { static const struct addi_board apci3200_boardtypes[] = {
{ {
.pc_DriverName = "apci3200", .pc_DriverName = "apci3200",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA, .i_VendorId = PCI_VENDOR_ID_ADDIDATA,
...@@ -57,10 +56,37 @@ static const struct addi_board boardtypes[] = { ...@@ -57,10 +56,37 @@ static const struct addi_board boardtypes[] = {
}, },
}; };
static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { static DEFINE_PCI_DEVICE_TABLE(apci3200_pci_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3000) }, { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3000) },
{ 0 } { 0 }
}; };
MODULE_DEVICE_TABLE(pci, addi_apci_tbl); MODULE_DEVICE_TABLE(pci, apci3200_pci_table);
#include "addi-data/addi_common.c" static struct comedi_driver apci3200_driver = {
.driver_name = "addi_apci_3200",
.module = THIS_MODULE,
.attach = i_ADDI_Attach,
.detach = i_ADDI_Detach,
.num_names = ARRAY_SIZE(apci3200_boardtypes),
.board_name = &apci3200_boardtypes[0].pc_DriverName,
.offset = sizeof(struct addi_board),
};
static int __devinit apci3200_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
return comedi_pci_auto_config(dev, &apci3200_driver);
}
static void __devexit apci3200_pci_remove(struct pci_dev *dev)
{
comedi_pci_auto_unconfig(dev);
}
static struct pci_driver apci3200_pci_driver = {
.name = "addi_apci_3200",
.id_table = apci3200_pci_table,
.probe = apci3200_pci_probe,
.remove = __devexit_p(apci3200_pci_remove),
};
module_comedi_pci_driver(apci3200_driver, apci3200_pci_driver);
...@@ -16,12 +16,11 @@ static void fpu_end(void) ...@@ -16,12 +16,11 @@ static void fpu_end(void)
kernel_fpu_end(); kernel_fpu_end();
} }
#define ADDIDATA_DRIVER_NAME "addi_apci_3300"
#include "addi-data/addi_eeprom.c" #include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci3200.c" #include "addi-data/hwdrv_apci3200.c"
#include "addi-data/addi_common.c"
static const struct addi_board boardtypes[] = { static const struct addi_board apci3300_boardtypes[] = {
{ {
.pc_DriverName = "apci3300", .pc_DriverName = "apci3300",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA, .i_VendorId = PCI_VENDOR_ID_ADDIDATA,
...@@ -56,10 +55,37 @@ static const struct addi_board boardtypes[] = { ...@@ -56,10 +55,37 @@ static const struct addi_board boardtypes[] = {
}, },
}; };
static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { static struct comedi_driver apci3300_driver = {
.driver_name = "addi_apci_3300",
.module = THIS_MODULE,
.attach = i_ADDI_Attach,
.detach = i_ADDI_Detach,
.num_names = ARRAY_SIZE(apci3300_boardtypes),
.board_name = &apci3300_boardtypes[0].pc_DriverName,
.offset = sizeof(struct addi_board),
};
static int __devinit apci3300_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
return comedi_pci_auto_config(dev, &apci3300_driver);
}
static void __devexit apci3300_pci_remove(struct pci_dev *dev)
{
comedi_pci_auto_unconfig(dev);
}
static DEFINE_PCI_DEVICE_TABLE(apci3300_pci_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3007) }, { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3007) },
{ 0 } { 0 }
}; };
MODULE_DEVICE_TABLE(pci, addi_apci_tbl); MODULE_DEVICE_TABLE(pci, apci3300_pci_table);
#include "addi-data/addi_common.c" static struct pci_driver apci3300_pci_driver = {
.name = "addi_apci_3300",
.id_table = apci3300_pci_table,
.probe = apci3300_pci_probe,
.remove = __devexit_p(apci3300_pci_remove),
};
module_comedi_pci_driver(apci3300_driver, apci3300_pci_driver);
...@@ -4,12 +4,11 @@ ...@@ -4,12 +4,11 @@
#include "addi-data/addi_common.h" #include "addi-data/addi_common.h"
#include "addi-data/addi_amcc_s5933.h" #include "addi-data/addi_amcc_s5933.h"
#define ADDIDATA_DRIVER_NAME "addi_apci_3501"
#include "addi-data/addi_eeprom.c" #include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci3501.c" #include "addi-data/hwdrv_apci3501.c"
#include "addi-data/addi_common.c"
static const struct addi_board boardtypes[] = { static const struct addi_board apci3501_boardtypes[] = {
{ {
.pc_DriverName = "apci3501", .pc_DriverName = "apci3501",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA, .i_VendorId = PCI_VENDOR_ID_ADDIDATA,
...@@ -38,13 +37,40 @@ static const struct addi_board boardtypes[] = { ...@@ -38,13 +37,40 @@ static const struct addi_board boardtypes[] = {
}, },
}; };
static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { static DEFINE_PCI_DEVICE_TABLE(apci3501_pci_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3001) }, { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3001) },
{ 0 } { 0 }
}; };
MODULE_DEVICE_TABLE(pci, addi_apci_tbl); MODULE_DEVICE_TABLE(pci, apci3501_pci_table);
#include "addi-data/addi_common.c" static struct comedi_driver apci3501_driver = {
.driver_name = "addi_apci_3501",
.module = THIS_MODULE,
.attach = i_ADDI_Attach,
.detach = i_ADDI_Detach,
.num_names = ARRAY_SIZE(apci3501_boardtypes),
.board_name = &apci3501_boardtypes[0].pc_DriverName,
.offset = sizeof(struct addi_board),
};
static int __devinit apci3501_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
return comedi_pci_auto_config(dev, &apci3501_driver);
}
static void __devexit apci3501_pci_remove(struct pci_dev *dev)
{
comedi_pci_auto_unconfig(dev);
}
static struct pci_driver apci3501_pci_driver = {
.name = "addi_apci_3501",
.id_table = apci3501_pci_table,
.probe = apci3501_pci_probe,
.remove = __devexit_p(apci3501_pci_remove),
};
module_comedi_pci_driver(apci3501_driver, apci3501_pci_driver);
MODULE_AUTHOR("Comedi http://www.comedi.org"); MODULE_AUTHOR("Comedi http://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver"); MODULE_DESCRIPTION("Comedi low-level driver");
......
...@@ -4,12 +4,11 @@ ...@@ -4,12 +4,11 @@
#include "addi-data/addi_common.h" #include "addi-data/addi_common.h"
#include "addi-data/addi_amcc_s5933.h" #include "addi-data/addi_amcc_s5933.h"
#define ADDIDATA_DRIVER_NAME "addi_apci_3xxx"
#include "addi-data/addi_eeprom.c" #include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci3xxx.c" #include "addi-data/hwdrv_apci3xxx.c"
#include "addi-data/addi_common.c"
static const struct addi_board boardtypes[] = { static const struct addi_board apci3xxx_boardtypes[] = {
{ {
.pc_DriverName = "apci3000-16", .pc_DriverName = "apci3000-16",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA, .i_VendorId = PCI_VENDOR_ID_ADDIDATA,
...@@ -778,7 +777,28 @@ static const struct addi_board boardtypes[] = { ...@@ -778,7 +777,28 @@ static const struct addi_board boardtypes[] = {
}, },
}; };
static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { static struct comedi_driver apci3xxx_driver = {
.driver_name = "addi_apci_3xxx",
.module = THIS_MODULE,
.attach = i_ADDI_Attach,
.detach = i_ADDI_Detach,
.num_names = ARRAY_SIZE(apci3xxx_boardtypes),
.board_name = &apci3xxx_boardtypes[0].pc_DriverName,
.offset = sizeof(struct addi_board),
};
static int __devinit apci3xxx_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
return comedi_pci_auto_config(dev, &apci3xxx_driver);
}
static void __devexit apci3xxx_pci_remove(struct pci_dev *dev)
{
comedi_pci_auto_unconfig(dev);
}
static DEFINE_PCI_DEVICE_TABLE(apci3xxx_pci_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3010) }, { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3010) },
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x300f) }, { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x300f) },
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x300e) }, { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x300e) },
...@@ -806,9 +826,15 @@ static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = { ...@@ -806,9 +826,15 @@ static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3024) }, { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3024) },
{ 0 } { 0 }
}; };
MODULE_DEVICE_TABLE(pci, addi_apci_tbl); MODULE_DEVICE_TABLE(pci, apci3xxx_pci_table);
#include "addi-data/addi_common.c" static struct pci_driver apci3xxx_pci_driver = {
.name = "addi_apci_3xxx",
.id_table = apci3xxx_pci_table,
.probe = apci3xxx_pci_probe,
.remove = __devexit_p(apci3xxx_pci_remove),
};
module_comedi_pci_driver(apci3xxx_driver, apci3xxx_pci_driver);
MODULE_AUTHOR("Comedi http://www.comedi.org"); MODULE_AUTHOR("Comedi http://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver"); MODULE_DESCRIPTION("Comedi low-level driver");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment