Staging: comedi: Give the addi_apci_* drivers different driver names
authorIan Abbott <abbotti@mev.co.uk>
Wed, 19 May 2010 14:11:57 +0000 (15:11 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 4 Jun 2010 20:38:52 +0000 (13:38 -0700)
It is not currently possible for more than one of the addi_apci_*
drivers to register themselves with comedi at once because they all use
the same comedi driver name "addi_common".  Give them different names.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 files changed:
drivers/staging/comedi/drivers/addi-data/addi_common.c
drivers/staging/comedi/drivers/addi_apci_035.c
drivers/staging/comedi/drivers/addi_apci_1032.c
drivers/staging/comedi/drivers/addi_apci_1500.c
drivers/staging/comedi/drivers/addi_apci_1516.c
drivers/staging/comedi/drivers/addi_apci_1564.c
drivers/staging/comedi/drivers/addi_apci_16xx.c
drivers/staging/comedi/drivers/addi_apci_1710.c
drivers/staging/comedi/drivers/addi_apci_2016.c
drivers/staging/comedi/drivers/addi_apci_2032.c
drivers/staging/comedi/drivers/addi_apci_2200.c
drivers/staging/comedi/drivers/addi_apci_3001.c
drivers/staging/comedi/drivers/addi_apci_3120.c
drivers/staging/comedi/drivers/addi_apci_3200.c
drivers/staging/comedi/drivers/addi_apci_3300.c
drivers/staging/comedi/drivers/addi_apci_3501.c
drivers/staging/comedi/drivers/addi_apci_3xxx.c

index 2c986413a81a442db349d018fa4bf300991ace01..d7f9bf49bb75a1b2420f2110ffc6c50636ca249c 100644 (file)
@@ -68,6 +68,10 @@ You should also find the complete GPL in the COPYING file accompanying this sour
 #include "addi_common.h"
 #include "addi_amcc_s5933.h"
 
+#ifndef ADDIDATA_DRIVER_NAME
+#define ADDIDATA_DRIVER_NAME   "addi_common"
+#endif
+
 /* Update-0.7.57->0.7.68MODULE_AUTHOR("ADDI-DATA GmbH <info@addi-data.com>"); */
 /* Update-0.7.57->0.7.68MODULE_DESCRIPTION("Comedi ADDI-DATA module"); */
 /* Update-0.7.57->0.7.68MODULE_LICENSE("GPL"); */
@@ -2528,7 +2532,7 @@ static const struct addi_board boardtypes[] = {
 #define n_boardtypes (sizeof(boardtypes)/sizeof(struct addi_board))
 
 static struct comedi_driver driver_addi = {
-       .driver_name = "addi_common",
+       .driver_name = ADDIDATA_DRIVER_NAME,
        .module = THIS_MODULE,
        .attach = i_ADDI_Attach,
        .detach = i_ADDI_Detach,
@@ -2583,7 +2587,7 @@ 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.. */
                pci_list_builded = 1;
        }
-       /* printk("comedi%d: addi_common: board=%s",dev->minor,this_board->pc_DriverName); */
+       /* printk("comedi%d: "ADDIDATA_DRIVER_NAME": board=%s",dev->minor,this_board->pc_DriverName); */
 
        if ((this_board->i_Dma) && (it->options[2] == 0)) {
                i_Dma = 1;
index da454e854c4cd16e7c02c98271399300e52263dc..6dfcbe803f2dcd18aeec42f93e7ea13861eb7fcd 100644 (file)
@@ -2,4 +2,6 @@
 
 #define ADDIDATA_WATCHDOG 2    /*  Or shold it be something else */
 
+#define ADDIDATA_DRIVER_NAME   "addi_apci_035"
+
 #include "addi-data/addi_common.c"
index fa2056e8aa0ece225245701122c1b3bc73423106..4722ec834f7bfd796b42da0c1a2883c4dc4b5993 100644 (file)
@@ -1,3 +1,5 @@
 #define CONFIG_APCI_1032 1
 
+#define ADDIDATA_DRIVER_NAME   "addi_apci_1032"
+
 #include "addi-data/addi_common.c"
index 7a5cae599ef80650fc5b8050f63a6dc520641e8d..db3dafdcf691728bb46bb4a653ea51eb54be6d4d 100644 (file)
@@ -1,3 +1,5 @@
 #define CONFIG_APCI_1500 1
 
+#define ADDIDATA_DRIVER_NAME   "addi_apci_1500"
+
 #include "addi-data/addi_common.c"
index 8d414844009f6455e23d8af82ccabc2588a0d3db..f591baff6a0b192606dfc810d5574bb401162618 100644 (file)
@@ -1,3 +1,5 @@
 #define CONFIG_APCI_1516 1
 
+#define ADDIDATA_DRIVER_NAME   "addi_apci_1516"
+
 #include "addi-data/addi_common.c"
index 0351cdde102623b628cc2a6111014884d51a80e5..6f5c923ac22604750486fb291f64f8cfffb493a1 100644 (file)
@@ -1,3 +1,5 @@
 #define CONFIG_APCI_1564 1
 
+#define ADDIDATA_DRIVER_NAME   "addi_apci_1564"
+
 #include "addi-data/addi_common.c"
index 5067990412948e676193b221e0fefc8d7faafa92..1d926add9e6d9606e57e70befcfa0188b1d6ccd6 100644 (file)
@@ -1,3 +1,5 @@
 #define CONFIG_APCI_16XX 1
 
+#define ADDIDATA_DRIVER_NAME   "addi_apci_16xx"
+
 #include "addi-data/addi_common.c"
index c433445913dd828bf63eb4499c1e5111c4d6495c..df6ba8ccf56f050b2062f87eca4ff8b27efa6a4f 100644 (file)
@@ -1,3 +1,5 @@
 #define CONFIG_APCI_1710 1
 
+#define ADDIDATA_DRIVER_NAME   "addi_apci_1710"
+
 #include "addi-data/addi_common.c"
index 271c47c8cad3c5bb997ae42e03adf6ec20a5047f..7266e412f0a6373109db9b1835be9276d5d4aff8 100644 (file)
@@ -1,3 +1,5 @@
 #define CONFIG_APCI_2016 1
 
+#define ADDIDATA_DRIVER_NAME   "addi_apci_2016"
+
 #include "addi-data/addi_common.c"
index 5108ea2a392435835b6a9181d7b9d8f136ac6f19..f67da94119e8c5ff1c027d801b07f05eb834b43d 100644 (file)
@@ -1,3 +1,5 @@
 #define CONFIG_APCI_2032 1
 
+#define ADDIDATA_DRIVER_NAME   "addi_apci_2032"
+
 #include "addi-data/addi_common.c"
index e439f835cf4f77a1bae8d8d765c032af72bd5cf2..bc7f7d6535034902dd37d198b6828968c93e833d 100644 (file)
@@ -1,3 +1,5 @@
 #define CONFIG_APCI_2200 1
 
+#define ADDIDATA_DRIVER_NAME   "addi_apci_2200"
+
 #include "addi-data/addi_common.c"
index df97c305828b562cf582fbe62b6df6eefca58a62..d86c4209cb90afd168f36e496b5aad875bcba445 100644 (file)
@@ -1,3 +1,5 @@
 #define CONFIG_APCI_3001 1
 
+#define ADDIDATA_DRIVER_NAME   "addi_apci_3001"
+
 #include "addi-data/addi_common.c"
index 9183125ddde413cbc6d21307caa33a285a5db830..0b22cf10415d3c9a8cc5d8291deb81fbee2902d1 100644 (file)
@@ -1,3 +1,5 @@
 #define CONFIG_APCI_3120 1
 
+#define ADDIDATA_DRIVER_NAME   "addi_apci_3120"
+
 #include "addi-data/addi_common.c"
index f25a70b3290b4784de5c842f14dbd1b055ab55fd..159313997dcf64fb97c2233cb661ea58cf8b2304 100644 (file)
@@ -1,3 +1,5 @@
 #define CONFIG_APCI_3200 1
 
+#define ADDIDATA_DRIVER_NAME   "addi_apci_3200"
+
 #include "addi-data/addi_common.c"
index 1ee4778ad45b38a58de4787e3b003d5ce2452602..733c69abc43a57901d27479105a8d0dfde396eba 100644 (file)
@@ -1,3 +1,5 @@
 #define CONFIG_APCI_3300 1
 
+#define ADDIDATA_DRIVER_NAME   "addi_apci_3300"
+
 #include "addi-data/addi_common.c"
index 1049e20237e8284357048c22befc1a4200b4f9a3..d8a01b154e3585372fdd3fc103cccb25ea32030a 100644 (file)
@@ -1,3 +1,5 @@
 #define CONFIG_APCI_3501 1
 
+#define ADDIDATA_DRIVER_NAME   "addi_apci_3501"
+
 #include "addi-data/addi_common.c"
index fb9deb7083bdf5998dedd160c3ff033c99860909..942bc9e259a8bdf3f8df7546350618455eaa66eb 100644 (file)
@@ -1,3 +1,5 @@
 #define CONFIG_APCI_3XXX 1
 
+#define ADDIDATA_DRIVER_NAME   "addi_apci_3xxx"
+
 #include "addi-data/addi_common.c"