aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2012-09-07 17:41:19 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-07 21:45:27 -0700
commit9e07273124d5586c4a59c4191cdd1e3743e978f3 (patch)
tree427a942fc6d482abdbb7097fc75497ec6d9a7cd2 /drivers
parent06b60981aa66cf5373a3fdcf2e3395db690874f6 (diff)
staging: comedi: me4000: move pci vendor/device ids to source
Move the pci vendor/device ids from the header to the c file and actually use them. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/comedi/drivers/me4000.c70
-rw-r--r--drivers/staging/comedi/drivers/me4000.h23
2 files changed, 43 insertions, 50 deletions
diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c
index 0eb39264d06..bdc060368fe 100644
--- a/drivers/staging/comedi/drivers/me4000.c
+++ b/drivers/staging/comedi/drivers/me4000.c
@@ -64,6 +64,22 @@ broken.
#include "me4000_fw.h"
#endif
+#define PCI_VENDOR_ID_MEILHAUS 0x1402
+
+#define PCI_DEVICE_ID_MEILHAUS_ME4650 0x4650
+#define PCI_DEVICE_ID_MEILHAUS_ME4660 0x4660
+#define PCI_DEVICE_ID_MEILHAUS_ME4660I 0x4661
+#define PCI_DEVICE_ID_MEILHAUS_ME4660S 0x4662
+#define PCI_DEVICE_ID_MEILHAUS_ME4660IS 0x4663
+#define PCI_DEVICE_ID_MEILHAUS_ME4670 0x4670
+#define PCI_DEVICE_ID_MEILHAUS_ME4670I 0x4671
+#define PCI_DEVICE_ID_MEILHAUS_ME4670S 0x4672
+#define PCI_DEVICE_ID_MEILHAUS_ME4670IS 0x4673
+#define PCI_DEVICE_ID_MEILHAUS_ME4680 0x4680
+#define PCI_DEVICE_ID_MEILHAUS_ME4680I 0x4681
+#define PCI_DEVICE_ID_MEILHAUS_ME4680S 0x4682
+#define PCI_DEVICE_ID_MEILHAUS_ME4680IS 0x4683
+
struct me4000_board {
const char *name;
unsigned short device_id;
@@ -80,26 +96,26 @@ struct me4000_board {
static const struct me4000_board me4000_boards[] = {
{
.name = "ME-4650",
- .device_id = 0x4650,
+ .device_id = PCI_DEVICE_ID_MEILHAUS_ME4650,
.ai_nchan = 16,
.dio_nchan = 32,
}, {
.name = "ME-4660",
- .device_id = 0x4660,
+ .device_id = PCI_DEVICE_ID_MEILHAUS_ME4660,
.ai_nchan = 32,
.ai_diff_nchan = 16,
.dio_nchan = 32,
.has_counter = 1,
}, {
.name = "ME-4660i",
- .device_id = 0x4661,
+ .device_id = PCI_DEVICE_ID_MEILHAUS_ME4660I,
.ai_nchan = 32,
.ai_diff_nchan = 16,
.dio_nchan = 32,
.has_counter = 1,
}, {
.name = "ME-4660s",
- .device_id = 0x4662,
+ .device_id = PCI_DEVICE_ID_MEILHAUS_ME4660S,
.ai_nchan = 32,
.ai_diff_nchan = 16,
.ai_sh_nchan = 8,
@@ -107,7 +123,7 @@ static const struct me4000_board me4000_boards[] = {
.has_counter = 1,
}, {
.name = "ME-4660is",
- .device_id = 0x4663,
+ .device_id = PCI_DEVICE_ID_MEILHAUS_ME4660IS,
.ai_nchan = 32,
.ai_diff_nchan = 16,
.ai_sh_nchan = 8,
@@ -115,7 +131,7 @@ static const struct me4000_board me4000_boards[] = {
.has_counter = 1,
}, {
.name = "ME-4670",
- .device_id = 0x4670,
+ .device_id = PCI_DEVICE_ID_MEILHAUS_ME4670,
.ao_nchan = 4,
.ai_nchan = 32,
.ai_diff_nchan = 16,
@@ -124,7 +140,7 @@ static const struct me4000_board me4000_boards[] = {
.has_counter = 1,
}, {
.name = "ME-4670i",
- .device_id = 0x4671,
+ .device_id = PCI_DEVICE_ID_MEILHAUS_ME4670I,
.ao_nchan = 4,
.ai_nchan = 32,
.ai_diff_nchan = 16,
@@ -133,7 +149,7 @@ static const struct me4000_board me4000_boards[] = {
.has_counter = 1,
}, {
.name = "ME-4670s",
- .device_id = 0x4672,
+ .device_id = PCI_DEVICE_ID_MEILHAUS_ME4670S,
.ao_nchan = 4,
.ai_nchan = 32,
.ai_diff_nchan = 16,
@@ -143,7 +159,7 @@ static const struct me4000_board me4000_boards[] = {
.has_counter = 1,
}, {
.name = "ME-4670is",
- .device_id = 0x4673,
+ .device_id = PCI_DEVICE_ID_MEILHAUS_ME4670IS,
.ao_nchan = 4,
.ai_nchan = 32,
.ai_diff_nchan = 16,
@@ -153,7 +169,7 @@ static const struct me4000_board me4000_boards[] = {
.has_counter = 1,
}, {
.name = "ME-4680",
- .device_id = 0x4680,
+ .device_id = PCI_DEVICE_ID_MEILHAUS_ME4680,
.ao_nchan = 4,
.ao_fifo = 4,
.ai_nchan = 32,
@@ -163,7 +179,7 @@ static const struct me4000_board me4000_boards[] = {
.has_counter = 1,
}, {
.name = "ME-4680i",
- .device_id = 0x4681,
+ .device_id = PCI_DEVICE_ID_MEILHAUS_ME4680I,
.ao_nchan = 4,
.ao_fifo = 4,
.ai_nchan = 32,
@@ -173,7 +189,7 @@ static const struct me4000_board me4000_boards[] = {
.has_counter = 1,
}, {
.name = "ME-4680s",
- .device_id = 0x4682,
+ .device_id = PCI_DEVICE_ID_MEILHAUS_ME4680S,
.ao_nchan = 4,
.ao_fifo = 4,
.ai_nchan = 32,
@@ -184,7 +200,7 @@ static const struct me4000_board me4000_boards[] = {
.has_counter = 1,
}, {
.name = "ME-4680is",
- .device_id = 0x4683,
+ .device_id = PCI_DEVICE_ID_MEILHAUS_ME4680IS,
.ao_nchan = 4,
.ao_fifo = 4,
.ai_nchan = 32,
@@ -2259,20 +2275,20 @@ static void __devexit me4000_pci_remove(struct pci_dev *dev)
}
static DEFINE_PCI_DEVICE_TABLE(me4000_pci_table) = {
- { PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, 0x4650) },
- { PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, 0x4660) },
- { PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, 0x4661) },
- { PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, 0x4662) },
- { PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, 0x4663) },
- { PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, 0x4670) },
- { PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, 0x4671) },
- { PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, 0x4672) },
- { PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, 0x4673) },
- { PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, 0x4680) },
- { PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, 0x4681) },
- { PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, 0x4682) },
- { PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, 0x4683) },
- { 0 }
+ {PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, PCI_DEVICE_ID_MEILHAUS_ME4650)},
+ {PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, PCI_DEVICE_ID_MEILHAUS_ME4660)},
+ {PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, PCI_DEVICE_ID_MEILHAUS_ME4660I)},
+ {PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, PCI_DEVICE_ID_MEILHAUS_ME4660S)},
+ {PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, PCI_DEVICE_ID_MEILHAUS_ME4660IS)},
+ {PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, PCI_DEVICE_ID_MEILHAUS_ME4670)},
+ {PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, PCI_DEVICE_ID_MEILHAUS_ME4670I)},
+ {PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, PCI_DEVICE_ID_MEILHAUS_ME4670S)},
+ {PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, PCI_DEVICE_ID_MEILHAUS_ME4670IS)},
+ {PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, PCI_DEVICE_ID_MEILHAUS_ME4680)},
+ {PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, PCI_DEVICE_ID_MEILHAUS_ME4680I)},
+ {PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, PCI_DEVICE_ID_MEILHAUS_ME4680S)},
+ {PCI_DEVICE(PCI_VENDOR_ID_MEILHAUS, PCI_DEVICE_ID_MEILHAUS_ME4680IS)},
+ {0}
};
MODULE_DEVICE_TABLE(pci, me4000_pci_table);
diff --git a/drivers/staging/comedi/drivers/me4000.h b/drivers/staging/comedi/drivers/me4000.h
index 6a92c15fc90..a6313084b29 100644
--- a/drivers/staging/comedi/drivers/me4000.h
+++ b/drivers/staging/comedi/drivers/me4000.h
@@ -25,29 +25,6 @@
#define _ME4000_H_
/*=============================================================================
- PCI vendor and device IDs
- ===========================================================================*/
-
-#define PCI_VENDOR_ID_MEILHAUS 0x1402
-
-#define PCI_DEVICE_ID_MEILHAUS_ME4650 0x4650 /* Low Cost version */
-
-#define PCI_DEVICE_ID_MEILHAUS_ME4660 0x4660 /* Standard version */
-#define PCI_DEVICE_ID_MEILHAUS_ME4660I 0x4661 /* Isolated version */
-#define PCI_DEVICE_ID_MEILHAUS_ME4660S 0x4662 /* Standard version with Sample and Hold */
-#define PCI_DEVICE_ID_MEILHAUS_ME4660IS 0x4663 /* Isolated version with Sample and Hold */
-
-#define PCI_DEVICE_ID_MEILHAUS_ME4670 0x4670 /* Standard version */
-#define PCI_DEVICE_ID_MEILHAUS_ME4670I 0x4671 /* Isolated version */
-#define PCI_DEVICE_ID_MEILHAUS_ME4670S 0x4672 /* Standard version with Sample and Hold */
-#define PCI_DEVICE_ID_MEILHAUS_ME4670IS 0x4673 /* Isolated version with Sample and Hold */
-
-#define PCI_DEVICE_ID_MEILHAUS_ME4680 0x4680 /* Standard version */
-#define PCI_DEVICE_ID_MEILHAUS_ME4680I 0x4681 /* Isolated version */
-#define PCI_DEVICE_ID_MEILHAUS_ME4680S 0x4682 /* Standard version with Sample and Hold */
-#define PCI_DEVICE_ID_MEILHAUS_ME4680IS 0x4683 /* Isolated version with Sample and Hold */
-
-/*=============================================================================
ME-4000 base register offsets
===========================================================================*/