lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200219174646.GA27559@kaaira-HP-Pavilion-Notebook>
Date:   Wed, 19 Feb 2020 23:16:46 +0530
From:   Kaaira Gupta <kgupta@...iitr.ac.in>
To:     Ian Abbott <abbotti@....co.uk>,
        H Hartley Sweeten <hsweeten@...ionengravers.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCH] staging: comedi: change CamelCase to CAPS

fix checkpatch.pl check of 'Avoid CamelCase' by changing NI_CtrSource to
NI_CTRSOURCE in all the files. Change it to CAPS because it is a MICRO

Signed-off-by: Kaaira Gupta <kgupta@...iitr.ac.in>
---
 drivers/staging/comedi/comedi.h               |   4 +-
 .../staging/comedi/drivers/ni_routing/README  |   4 +-
 .../ni_routing/ni_device_routes/pci-6070e.c   |  22 +-
 .../ni_routing/ni_device_routes/pci-6220.c    | 108 ++---
 .../ni_routing/ni_device_routes/pci-6221.c    | 108 ++---
 .../ni_routing/ni_device_routes/pci-6229.c    | 108 ++---
 .../ni_routing/ni_device_routes/pci-6251.c    | 108 ++---
 .../ni_routing/ni_device_routes/pci-6254.c    | 108 ++---
 .../ni_routing/ni_device_routes/pci-6259.c    | 108 ++---
 .../ni_routing/ni_device_routes/pci-6602.c    | 368 ++++++++--------
 .../ni_routing/ni_device_routes/pci-6713.c    |  22 +-
 .../ni_routing/ni_device_routes/pci-6723.c    |  22 +-
 .../ni_routing/ni_device_routes/pci-6733.c    |  22 +-
 .../ni_routing/ni_device_routes/pxi-6030e.c   |  20 +-
 .../ni_routing/ni_device_routes/pxi-6224.c    | 108 ++---
 .../ni_routing/ni_device_routes/pxi-6225.c    | 108 ++---
 .../ni_routing/ni_device_routes/pxi-6251.c    | 108 ++---
 .../ni_routing/ni_device_routes/pxi-6733.c    |  22 +-
 .../ni_routing/ni_device_routes/pxie-6251.c   | 108 ++---
 .../ni_routing/ni_device_routes/pxie-6738.c   | 408 +++++++++---------
 .../ni_routing/ni_route_values/ni_660x.c      |  64 +--
 .../ni_routing/ni_route_values/ni_eseries.c   |  22 +-
 .../ni_routing/ni_route_values/ni_mseries.c   | 104 ++---
 .../drivers/ni_routing/tools/ni_names.py      |   2 +-
 drivers/staging/comedi/drivers/ni_tio.c       |   6 +-
 .../comedi/drivers/tests/ni_routes_test.c     |   4 +-
 26 files changed, 1098 insertions(+), 1098 deletions(-)

diff --git a/drivers/staging/comedi/comedi.h b/drivers/staging/comedi/comedi.h
index 09a940066c0e..8b101658e477 100644
--- a/drivers/staging/comedi/comedi.h
+++ b/drivers/staging/comedi/comedi.h
@@ -1020,9 +1020,9 @@ enum i8254_mode {
 /* *** Counter/timer names : 8 counters max *** */
 #define NI_MAX_COUNTERS		8
 #define NI_COUNTER_NAMES_BASE	(NI_RTSI_BRD(-1)  + 1)
-#define NI_CtrSource(x)	      _TERM_N(NI_COUNTER_NAMES_BASE, NI_MAX_COUNTERS, x)
+#define NI_CTRSOURCE(x)	      _TERM_N(NI_COUNTER_NAMES_BASE, NI_MAX_COUNTERS, x)
 /* Gate, Aux, A,B,Z are all treated, at times as gates */
-#define NI_GATES_NAMES_BASE	(NI_CtrSource(-1) + 1)
+#define NI_GATES_NAMES_BASE	(NI_CTRSOURCE(-1) + 1)
 #define NI_CtrGate(x)		_TERM_N(NI_GATES_NAMES_BASE, NI_MAX_COUNTERS, x)
 #define NI_CtrAux(x)		_TERM_N(NI_CtrGate(-1)  + 1, NI_MAX_COUNTERS, x)
 #define NI_CtrA(x)		_TERM_N(NI_CtrAux(-1)   + 1, NI_MAX_COUNTERS, x)
diff --git a/drivers/staging/comedi/drivers/ni_routing/README b/drivers/staging/comedi/drivers/ni_routing/README
index b65c4ebedbc4..04bc4d535702 100644
--- a/drivers/staging/comedi/drivers/ni_routing/README
+++ b/drivers/staging/comedi/drivers/ni_routing/README
@@ -210,8 +210,8 @@ NI-STC with those naming conventions used here.
   PXI_Clk10
   NI_CtrOut(0)                  GPFO_0                      external ctr0out pin
   NI_CtrOut(1)                  GPFO_1                      external ctr1out pin
-  NI_CtrSource(0)
-  NI_CtrSource(1)
+  NI_CTRSOURCE(0)
+  NI_CTRSOURCE(1)
   NI_CtrGate(0)
   NI_CtrGate(1)
   NI_CtrInternalOutput(0)       G_OUT0, G0_TC               for Ctr1Source, Ctr1Gate
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6070e.c b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6070e.c
index f1126a0cb285..457bddba1b70 100644
--- a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6070e.c
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6070e.c
@@ -55,7 +55,7 @@ struct ni_device_routes ni_pci_6070e_device_routes = {
 		{
 			.dest = NI_PFI(3),
 			.src = (int[]){
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				0, /* Termination */
 			}
 		},
@@ -90,7 +90,7 @@ struct ni_device_routes ni_pci_6070e_device_routes = {
 		{
 			.dest = NI_PFI(8),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				0, /* Termination */
 			}
 		},
@@ -104,7 +104,7 @@ struct ni_device_routes ni_pci_6070e_device_routes = {
 		{
 			.dest = TRIGGER_LINE(0),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -120,7 +120,7 @@ struct ni_device_routes ni_pci_6070e_device_routes = {
 		{
 			.dest = TRIGGER_LINE(1),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -136,7 +136,7 @@ struct ni_device_routes ni_pci_6070e_device_routes = {
 		{
 			.dest = TRIGGER_LINE(2),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -152,7 +152,7 @@ struct ni_device_routes ni_pci_6070e_device_routes = {
 		{
 			.dest = TRIGGER_LINE(3),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -168,7 +168,7 @@ struct ni_device_routes ni_pci_6070e_device_routes = {
 		{
 			.dest = TRIGGER_LINE(4),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -184,7 +184,7 @@ struct ni_device_routes ni_pci_6070e_device_routes = {
 		{
 			.dest = TRIGGER_LINE(5),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -200,7 +200,7 @@ struct ni_device_routes ni_pci_6070e_device_routes = {
 		{
 			.dest = TRIGGER_LINE(6),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -221,7 +221,7 @@ struct ni_device_routes ni_pci_6070e_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(0),
+			.dest = NI_CTRSOURCE(0),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -249,7 +249,7 @@ struct ni_device_routes ni_pci_6070e_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(1),
+			.dest = NI_CTRSOURCE(1),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6220.c b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6220.c
index 74a59222963f..587eeeff2396 100644
--- a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6220.c
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6220.c
@@ -42,8 +42,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -70,8 +70,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -98,8 +98,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -126,8 +126,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -154,8 +154,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -182,8 +182,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -210,8 +210,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -238,8 +238,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -266,8 +266,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -294,8 +294,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -322,8 +322,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -350,8 +350,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -378,8 +378,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -406,8 +406,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -434,8 +434,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -462,8 +462,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -488,8 +488,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -514,8 +514,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -540,8 +540,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -566,8 +566,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -592,8 +592,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -618,8 +618,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -644,8 +644,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -670,8 +670,8 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -688,7 +688,7 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(0),
+			.dest = NI_CTRSOURCE(0),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -722,7 +722,7 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(1),
+			.dest = NI_CTRSOURCE(1),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -782,7 +782,7 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				NI_CtrInternalOutput(1),
 				NI_AI_StartTrigger,
 				NI_AI_ReferenceTrigger,
@@ -816,7 +816,7 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrInternalOutput(0),
 				NI_AI_StartTrigger,
 				NI_AI_ReferenceTrigger,
@@ -850,7 +850,7 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(1),
@@ -886,7 +886,7 @@ struct ni_device_routes ni_pci_6220_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6221.c b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6221.c
index 44dcbabf2a99..3d2585efb067 100644
--- a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6221.c
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6221.c
@@ -42,8 +42,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -72,8 +72,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -102,8 +102,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -132,8 +132,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -162,8 +162,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -192,8 +192,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -222,8 +222,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -252,8 +252,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -282,8 +282,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -312,8 +312,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -342,8 +342,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -372,8 +372,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -402,8 +402,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -432,8 +432,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -462,8 +462,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -492,8 +492,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -520,8 +520,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -549,8 +549,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -578,8 +578,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -607,8 +607,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -636,8 +636,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -665,8 +665,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -694,8 +694,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -723,8 +723,8 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -744,7 +744,7 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(0),
+			.dest = NI_CTRSOURCE(0),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -778,7 +778,7 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(1),
+			.dest = NI_CTRSOURCE(1),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -838,7 +838,7 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				NI_CtrInternalOutput(1),
 				NI_AI_StartTrigger,
 				NI_AI_ReferenceTrigger,
@@ -872,7 +872,7 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrInternalOutput(0),
 				NI_AI_StartTrigger,
 				NI_AI_ReferenceTrigger,
@@ -906,7 +906,7 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(1),
@@ -942,7 +942,7 @@ struct ni_device_routes ni_pci_6221_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6229.c b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6229.c
index fa5794e4e2b3..4a55e9f9ac98 100644
--- a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6229.c
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6229.c
@@ -42,8 +42,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -72,8 +72,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -102,8 +102,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -132,8 +132,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -162,8 +162,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -192,8 +192,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -222,8 +222,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -252,8 +252,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -282,8 +282,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -312,8 +312,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -342,8 +342,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -372,8 +372,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -402,8 +402,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -432,8 +432,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -462,8 +462,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -492,8 +492,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -520,8 +520,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -549,8 +549,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -578,8 +578,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -607,8 +607,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -636,8 +636,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -665,8 +665,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -694,8 +694,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -723,8 +723,8 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -744,7 +744,7 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(0),
+			.dest = NI_CTRSOURCE(0),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -778,7 +778,7 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(1),
+			.dest = NI_CTRSOURCE(1),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -838,7 +838,7 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				NI_CtrInternalOutput(1),
 				NI_AI_StartTrigger,
 				NI_AI_ReferenceTrigger,
@@ -872,7 +872,7 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrInternalOutput(0),
 				NI_AI_StartTrigger,
 				NI_AI_ReferenceTrigger,
@@ -906,7 +906,7 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(1),
@@ -942,7 +942,7 @@ struct ni_device_routes ni_pci_6229_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6251.c b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6251.c
index 645fd1cd2de4..643ecc77effc 100644
--- a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6251.c
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6251.c
@@ -42,8 +42,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -73,8 +73,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -104,8 +104,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -135,8 +135,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -166,8 +166,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -197,8 +197,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -228,8 +228,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -259,8 +259,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -290,8 +290,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -321,8 +321,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -352,8 +352,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -383,8 +383,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -414,8 +414,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -445,8 +445,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -476,8 +476,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -507,8 +507,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -536,8 +536,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -566,8 +566,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -596,8 +596,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -626,8 +626,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -656,8 +656,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -686,8 +686,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -716,8 +716,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -746,8 +746,8 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -768,7 +768,7 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(0),
+			.dest = NI_CTRSOURCE(0),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -803,7 +803,7 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(1),
+			.dest = NI_CTRSOURCE(1),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -864,7 +864,7 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				NI_CtrInternalOutput(1),
 				NI_AI_StartTrigger,
 				NI_AI_ReferenceTrigger,
@@ -899,7 +899,7 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrInternalOutput(0),
 				NI_AI_StartTrigger,
 				NI_AI_ReferenceTrigger,
@@ -934,7 +934,7 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(1),
@@ -971,7 +971,7 @@ struct ni_device_routes ni_pci_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6254.c b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6254.c
index 056a240cd3a2..be9c909828cc 100644
--- a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6254.c
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6254.c
@@ -42,8 +42,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -71,8 +71,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -100,8 +100,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -129,8 +129,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -158,8 +158,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -187,8 +187,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -216,8 +216,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -245,8 +245,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -274,8 +274,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -303,8 +303,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -332,8 +332,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -361,8 +361,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -390,8 +390,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -419,8 +419,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -448,8 +448,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -477,8 +477,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -504,8 +504,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -531,8 +531,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -558,8 +558,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -585,8 +585,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -612,8 +612,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -639,8 +639,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -666,8 +666,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -693,8 +693,8 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -712,7 +712,7 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(0),
+			.dest = NI_CTRSOURCE(0),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -747,7 +747,7 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(1),
+			.dest = NI_CTRSOURCE(1),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -808,7 +808,7 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				NI_CtrInternalOutput(1),
 				NI_AI_StartTrigger,
 				NI_AI_ReferenceTrigger,
@@ -843,7 +843,7 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrInternalOutput(0),
 				NI_AI_StartTrigger,
 				NI_AI_ReferenceTrigger,
@@ -878,7 +878,7 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(1),
@@ -915,7 +915,7 @@ struct ni_device_routes ni_pci_6254_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6259.c b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6259.c
index e0b5fa78c3bc..db729459ea46 100644
--- a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6259.c
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6259.c
@@ -42,8 +42,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -73,8 +73,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -104,8 +104,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -135,8 +135,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -166,8 +166,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -197,8 +197,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -228,8 +228,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -259,8 +259,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -290,8 +290,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -321,8 +321,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -352,8 +352,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -383,8 +383,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -414,8 +414,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -445,8 +445,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -476,8 +476,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -507,8 +507,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -536,8 +536,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -566,8 +566,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -596,8 +596,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -626,8 +626,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -656,8 +656,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -686,8 +686,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -716,8 +716,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -746,8 +746,8 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -768,7 +768,7 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(0),
+			.dest = NI_CTRSOURCE(0),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -803,7 +803,7 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(1),
+			.dest = NI_CTRSOURCE(1),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -864,7 +864,7 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				NI_CtrInternalOutput(1),
 				NI_AI_StartTrigger,
 				NI_AI_ReferenceTrigger,
@@ -899,7 +899,7 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrInternalOutput(0),
 				NI_AI_StartTrigger,
 				NI_AI_ReferenceTrigger,
@@ -934,7 +934,7 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(1),
@@ -971,7 +971,7 @@ struct ni_device_routes ni_pci_6259_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6602.c b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6602.c
index 91de9dac2d6a..c121ee77e0f2 100644
--- a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6602.c
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6602.c
@@ -135,7 +135,7 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 		{
 			.dest = NI_PFI(11),
 			.src = (int[]){
-				NI_CtrSource(7),
+				NI_CTRSOURCE(7),
 				NI_LogicLow,
 				0, /* Termination */
 			}
@@ -209,7 +209,7 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 		{
 			.dest = NI_PFI(15),
 			.src = (int[]){
-				NI_CtrSource(6),
+				NI_CTRSOURCE(6),
 				NI_LogicLow,
 				0, /* Termination */
 			}
@@ -283,7 +283,7 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 		{
 			.dest = NI_PFI(19),
 			.src = (int[]){
-				NI_CtrSource(5),
+				NI_CTRSOURCE(5),
 				0, /* Termination */
 			}
 		},
@@ -354,7 +354,7 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 		{
 			.dest = NI_PFI(23),
 			.src = (int[]){
-				NI_CtrSource(4),
+				NI_CTRSOURCE(4),
 				NI_LogicLow,
 				0, /* Termination */
 			}
@@ -375,8 +375,8 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(3),
-				NI_CtrSource(7),
+				NI_CTRSOURCE(3),
+				NI_CTRSOURCE(7),
 				NI_CtrGate(3),
 				NI_CtrGate(7),
 				NI_CtrInternalOutput(0),
@@ -408,8 +408,8 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(3),
-				NI_CtrSource(7),
+				NI_CTRSOURCE(3),
+				NI_CTRSOURCE(7),
 				NI_CtrGate(3),
 				NI_CtrGate(7),
 				NI_CtrInternalOutput(0),
@@ -435,7 +435,7 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 		{
 			.dest = NI_PFI(27),
 			.src = (int[]){
-				NI_CtrSource(3),
+				NI_CTRSOURCE(3),
 				0, /* Termination */
 			}
 		},
@@ -455,8 +455,8 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(2),
-				NI_CtrSource(6),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(6),
 				NI_CtrGate(2),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -487,8 +487,8 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(2),
-				NI_CtrSource(6),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(6),
 				NI_CtrGate(2),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -513,7 +513,7 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 		{
 			.dest = NI_PFI(31),
 			.src = (int[]){
-				NI_CtrSource(2),
+				NI_CTRSOURCE(2),
 				0, /* Termination */
 			}
 		},
@@ -533,8 +533,8 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
-				NI_CtrSource(5),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(5),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -564,8 +564,8 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
-				NI_CtrSource(5),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(5),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -590,7 +590,7 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 		{
 			.dest = NI_PFI(35),
 			.src = (int[]){
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				0, /* Termination */
 			}
 		},
@@ -644,8 +644,8 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(5),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(5),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -710,8 +710,8 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(5),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(5),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -736,7 +736,7 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 		{
 			.dest = NI_PFI(39),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				0, /* Termination */
 			}
 		},
@@ -783,14 +783,14 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				NI_PFI(37),
 				NI_PFI(38),
 				NI_PFI(39),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
-				NI_CtrSource(4),
-				NI_CtrSource(5),
-				NI_CtrSource(6),
-				NI_CtrSource(7),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
+				NI_CTRSOURCE(4),
+				NI_CTRSOURCE(5),
+				NI_CTRSOURCE(6),
+				NI_CTRSOURCE(7),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -855,14 +855,14 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				NI_PFI(37),
 				NI_PFI(38),
 				NI_PFI(39),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
-				NI_CtrSource(4),
-				NI_CtrSource(5),
-				NI_CtrSource(6),
-				NI_CtrSource(7),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
+				NI_CTRSOURCE(4),
+				NI_CTRSOURCE(5),
+				NI_CTRSOURCE(6),
+				NI_CTRSOURCE(7),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -927,14 +927,14 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				NI_PFI(37),
 				NI_PFI(38),
 				NI_PFI(39),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
-				NI_CtrSource(4),
-				NI_CtrSource(5),
-				NI_CtrSource(6),
-				NI_CtrSource(7),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
+				NI_CTRSOURCE(4),
+				NI_CTRSOURCE(5),
+				NI_CTRSOURCE(6),
+				NI_CTRSOURCE(7),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -999,14 +999,14 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				NI_PFI(37),
 				NI_PFI(38),
 				NI_PFI(39),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
-				NI_CtrSource(4),
-				NI_CtrSource(5),
-				NI_CtrSource(6),
-				NI_CtrSource(7),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
+				NI_CTRSOURCE(4),
+				NI_CTRSOURCE(5),
+				NI_CTRSOURCE(6),
+				NI_CTRSOURCE(7),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -1071,14 +1071,14 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				NI_PFI(37),
 				NI_PFI(38),
 				NI_PFI(39),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
-				NI_CtrSource(4),
-				NI_CtrSource(5),
-				NI_CtrSource(6),
-				NI_CtrSource(7),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
+				NI_CTRSOURCE(4),
+				NI_CTRSOURCE(5),
+				NI_CTRSOURCE(6),
+				NI_CTRSOURCE(7),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -1143,14 +1143,14 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				NI_PFI(37),
 				NI_PFI(38),
 				NI_PFI(39),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
-				NI_CtrSource(4),
-				NI_CtrSource(5),
-				NI_CtrSource(6),
-				NI_CtrSource(7),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
+				NI_CTRSOURCE(4),
+				NI_CTRSOURCE(5),
+				NI_CTRSOURCE(6),
+				NI_CTRSOURCE(7),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -1215,14 +1215,14 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				NI_PFI(37),
 				NI_PFI(38),
 				NI_PFI(39),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
-				NI_CtrSource(4),
-				NI_CtrSource(5),
-				NI_CtrSource(6),
-				NI_CtrSource(7),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
+				NI_CTRSOURCE(4),
+				NI_CTRSOURCE(5),
+				NI_CTRSOURCE(6),
+				NI_CTRSOURCE(7),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -1252,7 +1252,7 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(0),
+			.dest = NI_CTRSOURCE(0),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -1302,9 +1302,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
 				NI_CtrGate(3),
@@ -1320,7 +1320,7 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(1),
+			.dest = NI_CTRSOURCE(1),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -1370,9 +1370,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(2),
 				NI_CtrGate(3),
@@ -1388,7 +1388,7 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(2),
+			.dest = NI_CTRSOURCE(2),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -1438,9 +1438,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(3),
@@ -1456,7 +1456,7 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(3),
+			.dest = NI_CTRSOURCE(3),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -1506,9 +1506,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -1524,7 +1524,7 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(4),
+			.dest = NI_CTRSOURCE(4),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -1574,9 +1574,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(5),
-				NI_CtrSource(6),
-				NI_CtrSource(7),
+				NI_CTRSOURCE(5),
+				NI_CTRSOURCE(6),
+				NI_CTRSOURCE(7),
 				NI_CtrGate(5),
 				NI_CtrGate(6),
 				NI_CtrGate(7),
@@ -1592,7 +1592,7 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(5),
+			.dest = NI_CTRSOURCE(5),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -1642,9 +1642,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(4),
-				NI_CtrSource(6),
-				NI_CtrSource(7),
+				NI_CTRSOURCE(4),
+				NI_CTRSOURCE(6),
+				NI_CTRSOURCE(7),
 				NI_CtrGate(4),
 				NI_CtrGate(6),
 				NI_CtrGate(7),
@@ -1660,7 +1660,7 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(6),
+			.dest = NI_CTRSOURCE(6),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -1710,9 +1710,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(4),
-				NI_CtrSource(5),
-				NI_CtrSource(7),
+				NI_CTRSOURCE(4),
+				NI_CTRSOURCE(5),
+				NI_CTRSOURCE(7),
 				NI_CtrGate(4),
 				NI_CtrGate(5),
 				NI_CtrGate(7),
@@ -1728,7 +1728,7 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(7),
+			.dest = NI_CTRSOURCE(7),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -1778,9 +1778,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(4),
-				NI_CtrSource(5),
-				NI_CtrSource(6),
+				NI_CTRSOURCE(4),
+				NI_CTRSOURCE(5),
+				NI_CTRSOURCE(6),
 				NI_CtrGate(4),
 				NI_CtrGate(5),
 				NI_CtrGate(6),
@@ -1846,9 +1846,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
 				NI_CtrGate(3),
@@ -1911,9 +1911,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(2),
 				NI_CtrGate(3),
@@ -1976,9 +1976,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(3),
@@ -2041,9 +2041,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -2106,9 +2106,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(5),
-				NI_CtrSource(6),
-				NI_CtrSource(7),
+				NI_CTRSOURCE(5),
+				NI_CTRSOURCE(6),
+				NI_CTRSOURCE(7),
 				NI_CtrGate(5),
 				NI_CtrGate(6),
 				NI_CtrGate(7),
@@ -2171,9 +2171,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(4),
-				NI_CtrSource(6),
-				NI_CtrSource(7),
+				NI_CTRSOURCE(4),
+				NI_CTRSOURCE(6),
+				NI_CTRSOURCE(7),
 				NI_CtrGate(4),
 				NI_CtrGate(6),
 				NI_CtrGate(7),
@@ -2236,9 +2236,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(4),
-				NI_CtrSource(5),
-				NI_CtrSource(7),
+				NI_CTRSOURCE(4),
+				NI_CTRSOURCE(5),
+				NI_CTRSOURCE(7),
 				NI_CtrGate(4),
 				NI_CtrGate(5),
 				NI_CtrGate(7),
@@ -2301,9 +2301,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(4),
-				NI_CtrSource(5),
-				NI_CtrSource(6),
+				NI_CTRSOURCE(4),
+				NI_CTRSOURCE(5),
+				NI_CTRSOURCE(6),
 				NI_CtrGate(4),
 				NI_CtrGate(5),
 				NI_CtrGate(6),
@@ -2366,9 +2366,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -2432,9 +2432,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -2498,9 +2498,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -2564,9 +2564,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -2630,9 +2630,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(5),
-				NI_CtrSource(6),
-				NI_CtrSource(7),
+				NI_CTRSOURCE(5),
+				NI_CTRSOURCE(6),
+				NI_CTRSOURCE(7),
 				NI_CtrGate(4),
 				NI_CtrGate(5),
 				NI_CtrGate(6),
@@ -2696,9 +2696,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(4),
-				NI_CtrSource(6),
-				NI_CtrSource(7),
+				NI_CTRSOURCE(4),
+				NI_CTRSOURCE(6),
+				NI_CTRSOURCE(7),
 				NI_CtrGate(4),
 				NI_CtrGate(5),
 				NI_CtrGate(6),
@@ -2762,9 +2762,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(4),
-				NI_CtrSource(5),
-				NI_CtrSource(7),
+				NI_CTRSOURCE(4),
+				NI_CTRSOURCE(5),
+				NI_CTRSOURCE(7),
 				NI_CtrGate(4),
 				NI_CtrGate(5),
 				NI_CtrGate(6),
@@ -2828,9 +2828,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(4),
-				NI_CtrSource(5),
-				NI_CtrSource(6),
+				NI_CTRSOURCE(4),
+				NI_CTRSOURCE(5),
+				NI_CTRSOURCE(6),
 				NI_CtrGate(4),
 				NI_CtrGate(5),
 				NI_CtrGate(6),
@@ -2894,9 +2894,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
 				NI_CtrGate(3),
@@ -2959,9 +2959,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(2),
 				NI_CtrGate(3),
@@ -3024,9 +3024,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(3),
@@ -3089,9 +3089,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -3154,9 +3154,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(5),
-				NI_CtrSource(6),
-				NI_CtrSource(7),
+				NI_CTRSOURCE(5),
+				NI_CTRSOURCE(6),
+				NI_CTRSOURCE(7),
 				NI_CtrGate(5),
 				NI_CtrGate(6),
 				NI_CtrGate(7),
@@ -3219,9 +3219,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(4),
-				NI_CtrSource(6),
-				NI_CtrSource(7),
+				NI_CTRSOURCE(4),
+				NI_CTRSOURCE(6),
+				NI_CTRSOURCE(7),
 				NI_CtrGate(4),
 				NI_CtrGate(6),
 				NI_CtrGate(7),
@@ -3284,9 +3284,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(4),
-				NI_CtrSource(5),
-				NI_CtrSource(7),
+				NI_CTRSOURCE(4),
+				NI_CTRSOURCE(5),
+				NI_CTRSOURCE(7),
 				NI_CtrGate(4),
 				NI_CtrGate(5),
 				NI_CtrGate(7),
@@ -3349,9 +3349,9 @@ struct ni_device_routes ni_pci_6602_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(4),
-				NI_CtrSource(5),
-				NI_CtrSource(6),
+				NI_CTRSOURCE(4),
+				NI_CTRSOURCE(5),
+				NI_CTRSOURCE(6),
 				NI_CtrGate(4),
 				NI_CtrGate(5),
 				NI_CtrGate(6),
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6713.c b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6713.c
index d378b36d2084..48bada293b13 100644
--- a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6713.c
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6713.c
@@ -34,7 +34,7 @@ struct ni_device_routes ni_pci_6713_device_routes = {
 		{
 			.dest = NI_PFI(3),
 			.src = (int[]){
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				0, /* Termination */
 			}
 		},
@@ -62,7 +62,7 @@ struct ni_device_routes ni_pci_6713_device_routes = {
 		{
 			.dest = NI_PFI(8),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				0, /* Termination */
 			}
 		},
@@ -76,7 +76,7 @@ struct ni_device_routes ni_pci_6713_device_routes = {
 		{
 			.dest = TRIGGER_LINE(0),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -88,7 +88,7 @@ struct ni_device_routes ni_pci_6713_device_routes = {
 		{
 			.dest = TRIGGER_LINE(1),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -100,7 +100,7 @@ struct ni_device_routes ni_pci_6713_device_routes = {
 		{
 			.dest = TRIGGER_LINE(2),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -112,7 +112,7 @@ struct ni_device_routes ni_pci_6713_device_routes = {
 		{
 			.dest = TRIGGER_LINE(3),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -124,7 +124,7 @@ struct ni_device_routes ni_pci_6713_device_routes = {
 		{
 			.dest = TRIGGER_LINE(4),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -136,7 +136,7 @@ struct ni_device_routes ni_pci_6713_device_routes = {
 		{
 			.dest = TRIGGER_LINE(5),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -148,7 +148,7 @@ struct ni_device_routes ni_pci_6713_device_routes = {
 		{
 			.dest = TRIGGER_LINE(6),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -165,7 +165,7 @@ struct ni_device_routes ni_pci_6713_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(0),
+			.dest = NI_CTRSOURCE(0),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -192,7 +192,7 @@ struct ni_device_routes ni_pci_6713_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(1),
+			.dest = NI_CTRSOURCE(1),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6723.c b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6723.c
index e0cc57ab06e7..8a6271a04628 100644
--- a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6723.c
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6723.c
@@ -34,7 +34,7 @@ struct ni_device_routes ni_pci_6723_device_routes = {
 		{
 			.dest = NI_PFI(3),
 			.src = (int[]){
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				0, /* Termination */
 			}
 		},
@@ -62,7 +62,7 @@ struct ni_device_routes ni_pci_6723_device_routes = {
 		{
 			.dest = NI_PFI(8),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				0, /* Termination */
 			}
 		},
@@ -76,7 +76,7 @@ struct ni_device_routes ni_pci_6723_device_routes = {
 		{
 			.dest = TRIGGER_LINE(0),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -88,7 +88,7 @@ struct ni_device_routes ni_pci_6723_device_routes = {
 		{
 			.dest = TRIGGER_LINE(1),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -100,7 +100,7 @@ struct ni_device_routes ni_pci_6723_device_routes = {
 		{
 			.dest = TRIGGER_LINE(2),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -112,7 +112,7 @@ struct ni_device_routes ni_pci_6723_device_routes = {
 		{
 			.dest = TRIGGER_LINE(3),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -124,7 +124,7 @@ struct ni_device_routes ni_pci_6723_device_routes = {
 		{
 			.dest = TRIGGER_LINE(4),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -136,7 +136,7 @@ struct ni_device_routes ni_pci_6723_device_routes = {
 		{
 			.dest = TRIGGER_LINE(5),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -148,7 +148,7 @@ struct ni_device_routes ni_pci_6723_device_routes = {
 		{
 			.dest = TRIGGER_LINE(6),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -165,7 +165,7 @@ struct ni_device_routes ni_pci_6723_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(0),
+			.dest = NI_CTRSOURCE(0),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -192,7 +192,7 @@ struct ni_device_routes ni_pci_6723_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(1),
+			.dest = NI_CTRSOURCE(1),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6733.c b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6733.c
index f6e1e17ab854..eebaec53794c 100644
--- a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6733.c
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6733.c
@@ -34,7 +34,7 @@ struct ni_device_routes ni_pci_6733_device_routes = {
 		{
 			.dest = NI_PFI(3),
 			.src = (int[]){
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				0, /* Termination */
 			}
 		},
@@ -62,7 +62,7 @@ struct ni_device_routes ni_pci_6733_device_routes = {
 		{
 			.dest = NI_PFI(8),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				0, /* Termination */
 			}
 		},
@@ -76,7 +76,7 @@ struct ni_device_routes ni_pci_6733_device_routes = {
 		{
 			.dest = TRIGGER_LINE(0),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -88,7 +88,7 @@ struct ni_device_routes ni_pci_6733_device_routes = {
 		{
 			.dest = TRIGGER_LINE(1),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -100,7 +100,7 @@ struct ni_device_routes ni_pci_6733_device_routes = {
 		{
 			.dest = TRIGGER_LINE(2),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -112,7 +112,7 @@ struct ni_device_routes ni_pci_6733_device_routes = {
 		{
 			.dest = TRIGGER_LINE(3),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -124,7 +124,7 @@ struct ni_device_routes ni_pci_6733_device_routes = {
 		{
 			.dest = TRIGGER_LINE(4),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -136,7 +136,7 @@ struct ni_device_routes ni_pci_6733_device_routes = {
 		{
 			.dest = TRIGGER_LINE(5),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -148,7 +148,7 @@ struct ni_device_routes ni_pci_6733_device_routes = {
 		{
 			.dest = TRIGGER_LINE(6),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -165,7 +165,7 @@ struct ni_device_routes ni_pci_6733_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(0),
+			.dest = NI_CTRSOURCE(0),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -192,7 +192,7 @@ struct ni_device_routes ni_pci_6733_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(1),
+			.dest = NI_CTRSOURCE(1),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6030e.c b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6030e.c
index 9978d632117f..ba21a6dc70fe 100644
--- a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6030e.c
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6030e.c
@@ -55,7 +55,7 @@ struct ni_device_routes ni_pxi_6030e_device_routes = {
 		{
 			.dest = NI_PFI(3),
 			.src = (int[]){
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				0, /* Termination */
 			}
 		},
@@ -90,7 +90,7 @@ struct ni_device_routes ni_pxi_6030e_device_routes = {
 		{
 			.dest = NI_PFI(8),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				0, /* Termination */
 			}
 		},
@@ -104,7 +104,7 @@ struct ni_device_routes ni_pxi_6030e_device_routes = {
 		{
 			.dest = TRIGGER_LINE(0),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -120,7 +120,7 @@ struct ni_device_routes ni_pxi_6030e_device_routes = {
 		{
 			.dest = TRIGGER_LINE(1),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -136,7 +136,7 @@ struct ni_device_routes ni_pxi_6030e_device_routes = {
 		{
 			.dest = TRIGGER_LINE(2),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -152,7 +152,7 @@ struct ni_device_routes ni_pxi_6030e_device_routes = {
 		{
 			.dest = TRIGGER_LINE(3),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -168,7 +168,7 @@ struct ni_device_routes ni_pxi_6030e_device_routes = {
 		{
 			.dest = TRIGGER_LINE(4),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -184,7 +184,7 @@ struct ni_device_routes ni_pxi_6030e_device_routes = {
 		{
 			.dest = TRIGGER_LINE(5),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -205,7 +205,7 @@ struct ni_device_routes ni_pxi_6030e_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(0),
+			.dest = NI_CTRSOURCE(0),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -232,7 +232,7 @@ struct ni_device_routes ni_pxi_6030e_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(1),
+			.dest = NI_CTRSOURCE(1),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6224.c b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6224.c
index 1b89e27d7aa5..2e554c48528a 100644
--- a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6224.c
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6224.c
@@ -42,8 +42,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -70,8 +70,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -98,8 +98,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -126,8 +126,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -154,8 +154,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -182,8 +182,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -210,8 +210,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -238,8 +238,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -266,8 +266,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -294,8 +294,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -322,8 +322,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -350,8 +350,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -378,8 +378,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -406,8 +406,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -434,8 +434,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -462,8 +462,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -488,8 +488,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -513,8 +513,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -538,8 +538,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -563,8 +563,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -588,8 +588,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -613,8 +613,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -638,8 +638,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -663,8 +663,8 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -680,7 +680,7 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(0),
+			.dest = NI_CTRSOURCE(0),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -715,7 +715,7 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(1),
+			.dest = NI_CTRSOURCE(1),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -777,7 +777,7 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				NI_CtrInternalOutput(1),
 				NI_AI_StartTrigger,
 				NI_AI_ReferenceTrigger,
@@ -812,7 +812,7 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrInternalOutput(0),
 				NI_AI_StartTrigger,
 				NI_AI_ReferenceTrigger,
@@ -847,7 +847,7 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(1),
 				NI_AI_StartTrigger,
@@ -883,7 +883,7 @@ struct ni_device_routes ni_pxi_6224_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_AI_StartTrigger,
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6225.c b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6225.c
index 10dfc34bc87c..f6058ef831d5 100644
--- a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6225.c
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6225.c
@@ -42,8 +42,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -72,8 +72,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -102,8 +102,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -132,8 +132,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -162,8 +162,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -192,8 +192,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -222,8 +222,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -252,8 +252,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -282,8 +282,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -312,8 +312,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -342,8 +342,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -372,8 +372,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -402,8 +402,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -432,8 +432,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -462,8 +462,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -492,8 +492,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -520,8 +520,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -547,8 +547,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -574,8 +574,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -601,8 +601,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -628,8 +628,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -655,8 +655,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -682,8 +682,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -709,8 +709,8 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -728,7 +728,7 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(0),
+			.dest = NI_CTRSOURCE(0),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -763,7 +763,7 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(1),
+			.dest = NI_CTRSOURCE(1),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -825,7 +825,7 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				NI_CtrInternalOutput(1),
 				NI_AI_StartTrigger,
 				NI_AI_ReferenceTrigger,
@@ -860,7 +860,7 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrInternalOutput(0),
 				NI_AI_StartTrigger,
 				NI_AI_ReferenceTrigger,
@@ -895,7 +895,7 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(1),
 				NI_AI_StartTrigger,
@@ -931,7 +931,7 @@ struct ni_device_routes ni_pxi_6225_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_AI_StartTrigger,
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6251.c b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6251.c
index 25db4b7363de..a2826d7fdfc4 100644
--- a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6251.c
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6251.c
@@ -42,8 +42,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -73,8 +73,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -104,8 +104,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -135,8 +135,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -166,8 +166,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -197,8 +197,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -228,8 +228,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -259,8 +259,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -290,8 +290,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -321,8 +321,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -352,8 +352,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -383,8 +383,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -414,8 +414,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -445,8 +445,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -476,8 +476,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -507,8 +507,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -536,8 +536,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -563,8 +563,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -590,8 +590,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -617,8 +617,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -644,8 +644,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -671,8 +671,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -698,8 +698,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -725,8 +725,8 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrInternalOutput(1),
@@ -744,7 +744,7 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(0),
+			.dest = NI_CTRSOURCE(0),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -780,7 +780,7 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(1),
+			.dest = NI_CTRSOURCE(1),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -843,7 +843,7 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				NI_CtrInternalOutput(1),
 				PXI_Star,
 				NI_AI_StartTrigger,
@@ -879,7 +879,7 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrInternalOutput(0),
 				PXI_Star,
 				NI_AI_StartTrigger,
@@ -915,7 +915,7 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(1),
 				PXI_Star,
@@ -952,7 +952,7 @@ struct ni_device_routes ni_pxi_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				PXI_Star,
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6733.c b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6733.c
index 27da4433fc4a..455f92f344df 100644
--- a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6733.c
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6733.c
@@ -34,7 +34,7 @@ struct ni_device_routes ni_pxi_6733_device_routes = {
 		{
 			.dest = NI_PFI(3),
 			.src = (int[]){
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				0, /* Termination */
 			}
 		},
@@ -62,7 +62,7 @@ struct ni_device_routes ni_pxi_6733_device_routes = {
 		{
 			.dest = NI_PFI(8),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				0, /* Termination */
 			}
 		},
@@ -76,7 +76,7 @@ struct ni_device_routes ni_pxi_6733_device_routes = {
 		{
 			.dest = TRIGGER_LINE(0),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -88,7 +88,7 @@ struct ni_device_routes ni_pxi_6733_device_routes = {
 		{
 			.dest = TRIGGER_LINE(1),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -100,7 +100,7 @@ struct ni_device_routes ni_pxi_6733_device_routes = {
 		{
 			.dest = TRIGGER_LINE(2),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -112,7 +112,7 @@ struct ni_device_routes ni_pxi_6733_device_routes = {
 		{
 			.dest = TRIGGER_LINE(3),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -124,7 +124,7 @@ struct ni_device_routes ni_pxi_6733_device_routes = {
 		{
 			.dest = TRIGGER_LINE(4),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -136,7 +136,7 @@ struct ni_device_routes ni_pxi_6733_device_routes = {
 		{
 			.dest = TRIGGER_LINE(5),
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
@@ -153,7 +153,7 @@ struct ni_device_routes ni_pxi_6733_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(0),
+			.dest = NI_CTRSOURCE(0),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -180,7 +180,7 @@ struct ni_device_routes ni_pxi_6733_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(1),
+			.dest = NI_CTRSOURCE(1),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -278,7 +278,7 @@ struct ni_device_routes ni_pxi_6733_device_routes = {
 		{
 			.dest = PXI_Star,
 			.src = (int[]){
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrInternalOutput(0),
 				NI_CtrOut(0),
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxie-6251.c b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxie-6251.c
index 8354fe971d59..bb69c9708d7f 100644
--- a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxie-6251.c
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxie-6251.c
@@ -42,8 +42,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -73,8 +73,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -104,8 +104,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -135,8 +135,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -166,8 +166,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -197,8 +197,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -228,8 +228,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -259,8 +259,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -290,8 +290,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -321,8 +321,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -352,8 +352,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -383,8 +383,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -414,8 +414,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -445,8 +445,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -476,8 +476,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -507,8 +507,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -536,8 +536,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -566,8 +566,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -596,8 +596,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -626,8 +626,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -656,8 +656,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -686,8 +686,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -716,8 +716,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -746,8 +746,8 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				NI_PFI(3),
 				NI_PFI(4),
 				NI_PFI(5),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
@@ -768,7 +768,7 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(0),
+			.dest = NI_CTRSOURCE(0),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -804,7 +804,7 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(1),
+			.dest = NI_CTRSOURCE(1),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -866,7 +866,7 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				NI_CtrInternalOutput(1),
 				NI_AI_StartTrigger,
 				NI_AI_ReferenceTrigger,
@@ -901,7 +901,7 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrInternalOutput(0),
 				NI_AI_StartTrigger,
 				NI_AI_ReferenceTrigger,
@@ -936,7 +936,7 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
+				NI_CTRSOURCE(1),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(1),
@@ -973,7 +973,7 @@ struct ni_device_routes ni_pxie_6251_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
+				NI_CTRSOURCE(0),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrInternalOutput(0),
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxie-6738.c b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxie-6738.c
index d88504314d7f..6826030f913b 100644
--- a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxie-6738.c
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxie-6738.c
@@ -42,10 +42,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -89,10 +89,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -136,10 +136,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -183,10 +183,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -230,10 +230,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -277,10 +277,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -324,10 +324,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -371,10 +371,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -418,10 +418,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				NI_PFI(5),
 				NI_PFI(6),
 				NI_PFI(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -469,10 +469,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				NI_PFI(5),
 				NI_PFI(6),
 				NI_PFI(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -520,10 +520,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				NI_PFI(5),
 				NI_PFI(6),
 				NI_PFI(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -571,10 +571,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				NI_PFI(5),
 				NI_PFI(6),
 				NI_PFI(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -622,10 +622,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				NI_PFI(5),
 				NI_PFI(6),
 				NI_PFI(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -673,10 +673,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				NI_PFI(5),
 				NI_PFI(6),
 				NI_PFI(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -724,10 +724,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				NI_PFI(5),
 				NI_PFI(6),
 				NI_PFI(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -775,10 +775,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				NI_PFI(5),
 				NI_PFI(6),
 				NI_PFI(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -816,7 +816,7 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(0),
+			.dest = NI_CTRSOURCE(0),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -834,9 +834,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
 				NI_CtrGate(3),
@@ -871,7 +871,7 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(1),
+			.dest = NI_CTRSOURCE(1),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -889,9 +889,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(2),
 				NI_CtrGate(3),
@@ -926,7 +926,7 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(2),
+			.dest = NI_CTRSOURCE(2),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -944,9 +944,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(3),
@@ -981,7 +981,7 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 			}
 		},
 		{
-			.dest = NI_CtrSource(3),
+			.dest = NI_CTRSOURCE(3),
 			.src = (int[]){
 				NI_PFI(0),
 				NI_PFI(1),
@@ -999,9 +999,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -1054,9 +1054,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
 				NI_CtrGate(3),
@@ -1105,9 +1105,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(2),
 				NI_CtrGate(3),
@@ -1156,9 +1156,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(3),
@@ -1207,9 +1207,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -1258,9 +1258,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -1310,9 +1310,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -1362,9 +1362,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -1414,9 +1414,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -1466,9 +1466,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
 				NI_CtrGate(3),
@@ -1517,9 +1517,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(2),
 				NI_CtrGate(3),
@@ -1568,9 +1568,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(3),
@@ -1619,9 +1619,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -1670,9 +1670,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
 				NI_CtrGate(3),
@@ -1721,9 +1721,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(2),
 				NI_CtrGate(3),
@@ -1772,9 +1772,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(3),
@@ -1823,9 +1823,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -1874,9 +1874,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
 				NI_CtrGate(3),
@@ -1925,9 +1925,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(2),
 				NI_CtrGate(3),
@@ -1976,9 +1976,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(3),
@@ -2027,9 +2027,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -2078,9 +2078,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
 				NI_CtrGate(3),
@@ -2129,9 +2129,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(2),
 				NI_CtrGate(3),
@@ -2180,9 +2180,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(3),
@@ -2231,9 +2231,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -2282,9 +2282,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
 				NI_CtrGate(3),
@@ -2333,9 +2333,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(2),
 				NI_CtrGate(3),
@@ -2384,9 +2384,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(3),
@@ -2435,9 +2435,9 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -2486,10 +2486,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -2564,10 +2564,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -2616,10 +2616,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -2668,10 +2668,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -2746,10 +2746,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -2797,10 +2797,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -2848,10 +2848,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -2899,10 +2899,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -2977,10 +2977,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
@@ -3029,10 +3029,10 @@ struct ni_device_routes ni_pxie_6738_device_routes = {
 				TRIGGER_LINE(5),
 				TRIGGER_LINE(6),
 				TRIGGER_LINE(7),
-				NI_CtrSource(0),
-				NI_CtrSource(1),
-				NI_CtrSource(2),
-				NI_CtrSource(3),
+				NI_CTRSOURCE(0),
+				NI_CTRSOURCE(1),
+				NI_CTRSOURCE(2),
+				NI_CTRSOURCE(3),
 				NI_CtrGate(0),
 				NI_CtrGate(1),
 				NI_CtrGate(2),
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_route_values/ni_660x.c b/drivers/staging/comedi/drivers/ni_routing/ni_route_values/ni_660x.c
index f1c7e6646261..4ad273f429be 100644
--- a/drivers/staging/comedi/drivers/ni_routing/ni_route_values/ni_660x.c
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_route_values/ni_660x.c
@@ -53,7 +53,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(NI_CtrGate(7))]	= I(1),
 		},
 		[B(NI_PFI(11))] = {
-			[B(NI_CtrSource(7))]	= I(1),
+			[B(NI_CTRSOURCE(7))]	= I(1),
 		},
 		[B(NI_PFI(12))] = {
 			[B(NI_CtrInternalOutput(6))]	= I(1),
@@ -62,7 +62,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(NI_CtrGate(6))]	= I(1),
 		},
 		[B(NI_PFI(15))] = {
-			[B(NI_CtrSource(6))]	= I(1),
+			[B(NI_CTRSOURCE(6))]	= I(1),
 		},
 		[B(NI_PFI(16))] = {
 			[B(NI_CtrInternalOutput(5))]	= I(1),
@@ -71,7 +71,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(NI_CtrGate(5))]	= I(1),
 		},
 		[B(NI_PFI(19))] = {
-			[B(NI_CtrSource(5))]	= I(1),
+			[B(NI_CTRSOURCE(5))]	= I(1),
 		},
 		[B(NI_PFI(20))] = {
 			[B(NI_CtrInternalOutput(4))]	= I(1),
@@ -80,7 +80,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(NI_CtrGate(4))]	= I(1),
 		},
 		[B(NI_PFI(23))] = {
-			[B(NI_CtrSource(4))]	= I(1),
+			[B(NI_CTRSOURCE(4))]	= I(1),
 		},
 		[B(NI_PFI(24))] = {
 			[B(NI_CtrInternalOutput(3))]	= I(1),
@@ -89,7 +89,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(NI_CtrGate(3))]	= I(1),
 		},
 		[B(NI_PFI(27))] = {
-			[B(NI_CtrSource(3))]	= I(1),
+			[B(NI_CTRSOURCE(3))]	= I(1),
 		},
 		[B(NI_PFI(28))] = {
 			[B(NI_CtrInternalOutput(2))]	= I(1),
@@ -98,7 +98,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(NI_CtrGate(2))]	= I(1),
 		},
 		[B(NI_PFI(31))] = {
-			[B(NI_CtrSource(2))]	= I(1),
+			[B(NI_CTRSOURCE(2))]	= I(1),
 		},
 		[B(NI_PFI(32))] = {
 			[B(NI_CtrInternalOutput(1))]	= I(1),
@@ -107,7 +107,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(NI_CtrGate(1))]	= I(1),
 		},
 		[B(NI_PFI(35))] = {
-			[B(NI_CtrSource(1))]	= I(1),
+			[B(NI_CTRSOURCE(1))]	= I(1),
 		},
 		[B(NI_PFI(36))] = {
 			[B(NI_CtrInternalOutput(0))]	= I(1),
@@ -116,9 +116,9 @@ const struct family_route_values ni_660x_route_values = {
 			[B(NI_CtrGate(0))]	= I(1),
 		},
 		[B(NI_PFI(39))] = {
-			[B(NI_CtrSource(0))]	= I(1),
+			[B(NI_CTRSOURCE(0))]	= I(1),
 		},
-		[B(NI_CtrSource(0))] = {
+		[B(NI_CTRSOURCE(0))] = {
 			/* These are not currently implemented in ni modules */
 			[B(NI_PFI(11))]	= U(9),
 			[B(NI_PFI(15))]	= U(8),
@@ -141,7 +141,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(NI_100kHzTimebase)]	= U(18),
 			[B(NI_LogicLow)]	= U(31),
 		},
-		[B(NI_CtrSource(1))] = {
+		[B(NI_CTRSOURCE(1))] = {
 			/* These are not currently implemented in ni modules */
 			[B(NI_PFI(11))]	= U(9),
 			[B(NI_PFI(15))]	= U(8),
@@ -164,7 +164,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(NI_100kHzTimebase)]	= U(18),
 			[B(NI_LogicLow)]	= U(31),
 		},
-		[B(NI_CtrSource(2))] = {
+		[B(NI_CTRSOURCE(2))] = {
 			/* These are not currently implemented in ni modules */
 			[B(NI_PFI(11))]	= U(9),
 			[B(NI_PFI(15))]	= U(8),
@@ -187,7 +187,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(NI_100kHzTimebase)]	= U(18),
 			[B(NI_LogicLow)]	= U(31),
 		},
-		[B(NI_CtrSource(3))] = {
+		[B(NI_CTRSOURCE(3))] = {
 			/* These are not currently implemented in ni modules */
 			[B(NI_PFI(11))]	= U(9),
 			[B(NI_PFI(15))]	= U(8),
@@ -210,7 +210,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(NI_100kHzTimebase)]	= U(18),
 			[B(NI_LogicLow)]	= U(31),
 		},
-		[B(NI_CtrSource(4))] = {
+		[B(NI_CTRSOURCE(4))] = {
 			/* These are not currently implemented in ni modules */
 			[B(NI_PFI(11))]	= U(9),
 			[B(NI_PFI(15))]	= U(8),
@@ -233,7 +233,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(NI_100kHzTimebase)]	= U(18),
 			[B(NI_LogicLow)]	= U(31),
 		},
-		[B(NI_CtrSource(5))] = {
+		[B(NI_CTRSOURCE(5))] = {
 			/* These are not currently implemented in ni modules */
 			[B(NI_PFI(11))]	= U(9),
 			[B(NI_PFI(15))]	= U(8),
@@ -256,7 +256,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(NI_100kHzTimebase)]	= U(18),
 			[B(NI_LogicLow)]	= U(31),
 		},
-		[B(NI_CtrSource(6))] = {
+		[B(NI_CTRSOURCE(6))] = {
 			/* These are not currently implemented in ni modules */
 			[B(NI_PFI(11))]	= U(9),
 			[B(NI_PFI(15))]	= U(8 /* or 1 */),
@@ -279,7 +279,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(NI_100kHzTimebase)]	= U(18),
 			[B(NI_LogicLow)]	= U(31),
 		},
-		[B(NI_CtrSource(7))] = {
+		[B(NI_CTRSOURCE(7))] = {
 			/* These are not currently implemented in ni modules */
 			[B(NI_PFI(11))]	= U(9 /* or 1 */),
 			[B(NI_PFI(15))]	= U(8),
@@ -319,7 +319,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(TRIGGER_LINE(4))]	= I(15),
 			[B(TRIGGER_LINE(5))]	= I(16),
 			[B(TRIGGER_LINE(6))]	= I(17),
-			[B(NI_CtrSource(1))]	= I(10),
+			[B(NI_CTRSOURCE(1))]	= I(10),
 			[B(NI_CtrInternalOutput(1))]	= I(20),
 			[B(NI_LogicLow)]	= I(31 /* or 30 */),
 		},
@@ -340,7 +340,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(TRIGGER_LINE(4))]	= I(15),
 			[B(TRIGGER_LINE(5))]	= I(16),
 			[B(TRIGGER_LINE(6))]	= I(17),
-			[B(NI_CtrSource(2))]	= I(10),
+			[B(NI_CTRSOURCE(2))]	= I(10),
 			[B(NI_CtrInternalOutput(2))]	= I(20),
 			[B(NI_LogicLow)]	= I(31 /* or 30 */),
 		},
@@ -361,7 +361,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(TRIGGER_LINE(4))]	= I(15),
 			[B(TRIGGER_LINE(5))]	= I(16),
 			[B(TRIGGER_LINE(6))]	= I(17),
-			[B(NI_CtrSource(3))]	= I(10),
+			[B(NI_CTRSOURCE(3))]	= I(10),
 			[B(NI_CtrInternalOutput(3))]	= I(20),
 			[B(NI_LogicLow)]	= I(31 /* or 30 */),
 		},
@@ -382,7 +382,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(TRIGGER_LINE(4))]	= I(15),
 			[B(TRIGGER_LINE(5))]	= I(16),
 			[B(TRIGGER_LINE(6))]	= I(17),
-			[B(NI_CtrSource(4))]	= I(10),
+			[B(NI_CTRSOURCE(4))]	= I(10),
 			[B(NI_CtrInternalOutput(4))]	= I(20),
 			[B(NI_LogicLow)]	= I(31 /* or 30 */),
 		},
@@ -403,7 +403,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(TRIGGER_LINE(4))]	= I(15),
 			[B(TRIGGER_LINE(5))]	= I(16),
 			[B(TRIGGER_LINE(6))]	= I(17),
-			[B(NI_CtrSource(5))]	= I(10),
+			[B(NI_CTRSOURCE(5))]	= I(10),
 			[B(NI_CtrInternalOutput(5))]	= I(20),
 			[B(NI_LogicLow)]	= I(31 /* or 30 */),
 		},
@@ -424,7 +424,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(TRIGGER_LINE(4))]	= I(15),
 			[B(TRIGGER_LINE(5))]	= I(16),
 			[B(TRIGGER_LINE(6))]	= I(17),
-			[B(NI_CtrSource(6))]	= I(10),
+			[B(NI_CTRSOURCE(6))]	= I(10),
 			[B(NI_CtrInternalOutput(6))]	= I(20),
 			[B(NI_LogicLow)]	= I(31 /* or 30 */),
 		},
@@ -445,7 +445,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(TRIGGER_LINE(4))]	= I(15),
 			[B(TRIGGER_LINE(5))]	= I(16),
 			[B(TRIGGER_LINE(6))]	= I(17),
-			[B(NI_CtrSource(7))]	= I(10),
+			[B(NI_CTRSOURCE(7))]	= I(10),
 			[B(NI_CtrInternalOutput(7))]	= I(20),
 			[B(NI_LogicLow)]	= I(31 /* or 30 */),
 		},
@@ -466,7 +466,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(TRIGGER_LINE(4))]	= I(15),
 			[B(TRIGGER_LINE(5))]	= I(16),
 			[B(TRIGGER_LINE(6))]	= I(17),
-			[B(NI_CtrSource(0))]	= I(10),
+			[B(NI_CTRSOURCE(0))]	= I(10),
 			[B(NI_CtrInternalOutput(0))]	= I(20),
 			[B(NI_LogicLow)]	= I(31 /* or 30 */),
 		},
@@ -487,7 +487,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(TRIGGER_LINE(4))]	= I(15),
 			[B(TRIGGER_LINE(5))]	= I(16),
 			[B(TRIGGER_LINE(6))]	= I(17),
-			[B(NI_CtrSource(1))]	= I(10),
+			[B(NI_CTRSOURCE(1))]	= I(10),
 			[B(NI_CtrGate(1))]	= I(30),
 			[B(NI_CtrInternalOutput(1))]	= I(20),
 			[B(NI_LogicLow)]	= I(31),
@@ -509,7 +509,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(TRIGGER_LINE(4))]	= I(15),
 			[B(TRIGGER_LINE(5))]	= I(16),
 			[B(TRIGGER_LINE(6))]	= I(17),
-			[B(NI_CtrSource(2))]	= I(10),
+			[B(NI_CTRSOURCE(2))]	= I(10),
 			[B(NI_CtrGate(2))]	= I(30),
 			[B(NI_CtrInternalOutput(2))]	= I(20),
 			[B(NI_LogicLow)]	= I(31),
@@ -531,7 +531,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(TRIGGER_LINE(4))]	= I(15),
 			[B(TRIGGER_LINE(5))]	= I(16),
 			[B(TRIGGER_LINE(6))]	= I(17),
-			[B(NI_CtrSource(3))]	= I(10),
+			[B(NI_CTRSOURCE(3))]	= I(10),
 			[B(NI_CtrGate(3))]	= I(30),
 			[B(NI_CtrInternalOutput(3))]	= I(20),
 			[B(NI_LogicLow)]	= I(31),
@@ -553,7 +553,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(TRIGGER_LINE(4))]	= I(15),
 			[B(TRIGGER_LINE(5))]	= I(16),
 			[B(TRIGGER_LINE(6))]	= I(17),
-			[B(NI_CtrSource(4))]	= I(10),
+			[B(NI_CTRSOURCE(4))]	= I(10),
 			[B(NI_CtrGate(4))]	= I(30),
 			[B(NI_CtrInternalOutput(4))]	= I(20),
 			[B(NI_LogicLow)]	= I(31),
@@ -575,7 +575,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(TRIGGER_LINE(4))]	= I(15),
 			[B(TRIGGER_LINE(5))]	= I(16),
 			[B(TRIGGER_LINE(6))]	= I(17),
-			[B(NI_CtrSource(5))]	= I(10),
+			[B(NI_CTRSOURCE(5))]	= I(10),
 			[B(NI_CtrGate(5))]	= I(30),
 			[B(NI_CtrInternalOutput(5))]	= I(20),
 			[B(NI_LogicLow)]	= I(31),
@@ -597,7 +597,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(TRIGGER_LINE(4))]	= I(15),
 			[B(TRIGGER_LINE(5))]	= I(16),
 			[B(TRIGGER_LINE(6))]	= I(17),
-			[B(NI_CtrSource(6))]	= I(10),
+			[B(NI_CTRSOURCE(6))]	= I(10),
 			[B(NI_CtrGate(6))]	= I(30),
 			[B(NI_CtrInternalOutput(6))]	= I(20),
 			[B(NI_LogicLow)]	= I(31),
@@ -619,7 +619,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(TRIGGER_LINE(4))]	= I(15),
 			[B(TRIGGER_LINE(5))]	= I(16),
 			[B(TRIGGER_LINE(6))]	= I(17),
-			[B(NI_CtrSource(7))]	= I(10),
+			[B(NI_CTRSOURCE(7))]	= I(10),
 			[B(NI_CtrGate(7))]	= I(30),
 			[B(NI_CtrInternalOutput(7))]	= I(20),
 			[B(NI_LogicLow)]	= I(31),
@@ -641,7 +641,7 @@ const struct family_route_values ni_660x_route_values = {
 			[B(TRIGGER_LINE(4))]	= I(15),
 			[B(TRIGGER_LINE(5))]	= I(16),
 			[B(TRIGGER_LINE(6))]	= I(17),
-			[B(NI_CtrSource(0))]	= I(10),
+			[B(NI_CTRSOURCE(0))]	= I(10),
 			[B(NI_CtrGate(0))]	= I(30),
 			[B(NI_CtrInternalOutput(0))]	= I(20),
 			[B(NI_LogicLow)]	= I(31),
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_route_values/ni_eseries.c b/drivers/staging/comedi/drivers/ni_routing/ni_route_values/ni_eseries.c
index d1ab3c9ce585..c88fa1b5826e 100644
--- a/drivers/staging/comedi/drivers/ni_routing/ni_route_values/ni_eseries.c
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_route_values/ni_eseries.c
@@ -61,7 +61,7 @@ const struct family_route_values ni_eseries_route_values = {
 			[B(NI_AI_ConvertClock)]	= I(NI_PFI_OUTPUT_AI_CONVERT),
 		},
 		[B(NI_PFI(3))] = {
-			[B(NI_CtrSource(1))]	= I(NI_PFI_OUTPUT_G_SRC1),
+			[B(NI_CTRSOURCE(1))]	= I(NI_PFI_OUTPUT_G_SRC1),
 		},
 		[B(NI_PFI(4))] = {
 			[B(NI_CtrGate(1))]	= I(NI_PFI_OUTPUT_G_GATE1),
@@ -76,7 +76,7 @@ const struct family_route_values ni_eseries_route_values = {
 			[B(NI_AI_SampleClock)]	= I(NI_PFI_OUTPUT_AI_START_PULSE),
 		},
 		[B(NI_PFI(8))] = {
-			[B(NI_CtrSource(0))]	= I(NI_PFI_OUTPUT_G_SRC0),
+			[B(NI_CTRSOURCE(0))]	= I(NI_PFI_OUTPUT_G_SRC0),
 		},
 		[B(NI_PFI(9))] = {
 			[B(NI_CtrGate(0))]	= I(NI_PFI_OUTPUT_G_GATE0),
@@ -86,7 +86,7 @@ const struct family_route_values ni_eseries_route_values = {
 			[B(NI_RTSI_BRD(1))]	= I(9),
 			[B(NI_RTSI_BRD(2))]	= I(10),
 			[B(NI_RTSI_BRD(3))]	= I(11),
-			[B(NI_CtrSource(0))]	= I(5),
+			[B(NI_CTRSOURCE(0))]	= I(5),
 			[B(NI_CtrGate(0))]	= I(6),
 			[B(NI_AI_StartTrigger)]	= I(0),
 			[B(NI_AI_ReferenceTrigger)]	= I(1),
@@ -100,7 +100,7 @@ const struct family_route_values ni_eseries_route_values = {
 			[B(NI_RTSI_BRD(1))]	= I(9),
 			[B(NI_RTSI_BRD(2))]	= I(10),
 			[B(NI_RTSI_BRD(3))]	= I(11),
-			[B(NI_CtrSource(0))]	= I(5),
+			[B(NI_CTRSOURCE(0))]	= I(5),
 			[B(NI_CtrGate(0))]	= I(6),
 			[B(NI_AI_StartTrigger)]	= I(0),
 			[B(NI_AI_ReferenceTrigger)]	= I(1),
@@ -114,7 +114,7 @@ const struct family_route_values ni_eseries_route_values = {
 			[B(NI_RTSI_BRD(1))]	= I(9),
 			[B(NI_RTSI_BRD(2))]	= I(10),
 			[B(NI_RTSI_BRD(3))]	= I(11),
-			[B(NI_CtrSource(0))]	= I(5),
+			[B(NI_CTRSOURCE(0))]	= I(5),
 			[B(NI_CtrGate(0))]	= I(6),
 			[B(NI_AI_StartTrigger)]	= I(0),
 			[B(NI_AI_ReferenceTrigger)]	= I(1),
@@ -128,7 +128,7 @@ const struct family_route_values ni_eseries_route_values = {
 			[B(NI_RTSI_BRD(1))]	= I(9),
 			[B(NI_RTSI_BRD(2))]	= I(10),
 			[B(NI_RTSI_BRD(3))]	= I(11),
-			[B(NI_CtrSource(0))]	= I(5),
+			[B(NI_CTRSOURCE(0))]	= I(5),
 			[B(NI_CtrGate(0))]	= I(6),
 			[B(NI_AI_StartTrigger)]	= I(0),
 			[B(NI_AI_ReferenceTrigger)]	= I(1),
@@ -142,7 +142,7 @@ const struct family_route_values ni_eseries_route_values = {
 			[B(NI_RTSI_BRD(1))]	= I(9),
 			[B(NI_RTSI_BRD(2))]	= I(10),
 			[B(NI_RTSI_BRD(3))]	= I(11),
-			[B(NI_CtrSource(0))]	= I(5),
+			[B(NI_CTRSOURCE(0))]	= I(5),
 			[B(NI_CtrGate(0))]	= I(6),
 			[B(NI_AI_StartTrigger)]	= I(0),
 			[B(NI_AI_ReferenceTrigger)]	= I(1),
@@ -156,7 +156,7 @@ const struct family_route_values ni_eseries_route_values = {
 			[B(NI_RTSI_BRD(1))]	= I(9),
 			[B(NI_RTSI_BRD(2))]	= I(10),
 			[B(NI_RTSI_BRD(3))]	= I(11),
-			[B(NI_CtrSource(0))]	= I(5),
+			[B(NI_CTRSOURCE(0))]	= I(5),
 			[B(NI_CtrGate(0))]	= I(6),
 			[B(NI_AI_StartTrigger)]	= I(0),
 			[B(NI_AI_ReferenceTrigger)]	= I(1),
@@ -170,7 +170,7 @@ const struct family_route_values ni_eseries_route_values = {
 			[B(NI_RTSI_BRD(1))]	= I(9),
 			[B(NI_RTSI_BRD(2))]	= I(10),
 			[B(NI_RTSI_BRD(3))]	= I(11),
-			[B(NI_CtrSource(0))]	= I(5),
+			[B(NI_CTRSOURCE(0))]	= I(5),
 			[B(NI_CtrGate(0))]	= I(6),
 			[B(NI_AI_StartTrigger)]	= I(0),
 			[B(NI_AI_ReferenceTrigger)]	= I(1),
@@ -226,7 +226,7 @@ const struct family_route_values ni_eseries_route_values = {
 			[B(PXI_Star)]	= I(6),
 			[B(NI_AI_SampleClock)]	= I(7),
 		},
-		[B(NI_CtrSource(0))] = {
+		[B(NI_CTRSOURCE(0))] = {
 			/* These are not currently implemented in ni modules */
 			[B(NI_PFI(0))]	= U(1),
 			[B(NI_PFI(1))]	= U(2),
@@ -251,7 +251,7 @@ const struct family_route_values ni_eseries_route_values = {
 			[B(NI_100kHzTimebase)]	= U(18),
 			[B(NI_LogicLow)]	= U(31),
 		},
-		[B(NI_CtrSource(1))] = {
+		[B(NI_CTRSOURCE(1))] = {
 			/* These are not currently implemented in ni modules */
 			[B(NI_PFI(0))]	= U(1),
 			[B(NI_PFI(1))]	= U(2),
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_route_values/ni_mseries.c b/drivers/staging/comedi/drivers/ni_routing/ni_route_values/ni_mseries.c
index c59d8afe0ae9..465cf6f345fa 100644
--- a/drivers/staging/comedi/drivers/ni_routing/ni_route_values/ni_mseries.c
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_route_values/ni_mseries.c
@@ -63,8 +63,8 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(TRIGGER_LINE(5))]	= I(23),
 			[B(TRIGGER_LINE(6))]	= I(24),
 			[B(TRIGGER_LINE(7))]	= I(25),
-			[B(NI_CtrSource(0))]	= I(9),
-			[B(NI_CtrSource(1))]	= I(4),
+			[B(NI_CTRSOURCE(0))]	= I(9),
+			[B(NI_CTRSOURCE(1))]	= I(4),
 			[B(NI_CtrGate(0))]	= I(10),
 			[B(NI_CtrGate(1))]	= I(5),
 			[B(NI_CtrInternalOutput(0))]	= I(13),
@@ -95,8 +95,8 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(TRIGGER_LINE(5))]	= I(23),
 			[B(TRIGGER_LINE(6))]	= I(24),
 			[B(TRIGGER_LINE(7))]	= I(25),
-			[B(NI_CtrSource(0))]	= I(9),
-			[B(NI_CtrSource(1))]	= I(4),
+			[B(NI_CTRSOURCE(0))]	= I(9),
+			[B(NI_CTRSOURCE(1))]	= I(4),
 			[B(NI_CtrGate(0))]	= I(10),
 			[B(NI_CtrGate(1))]	= I(5),
 			[B(NI_CtrInternalOutput(0))]	= I(13),
@@ -127,8 +127,8 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(TRIGGER_LINE(5))]	= I(23),
 			[B(TRIGGER_LINE(6))]	= I(24),
 			[B(TRIGGER_LINE(7))]	= I(25),
-			[B(NI_CtrSource(0))]	= I(9),
-			[B(NI_CtrSource(1))]	= I(4),
+			[B(NI_CTRSOURCE(0))]	= I(9),
+			[B(NI_CTRSOURCE(1))]	= I(4),
 			[B(NI_CtrGate(0))]	= I(10),
 			[B(NI_CtrGate(1))]	= I(5),
 			[B(NI_CtrInternalOutput(0))]	= I(13),
@@ -159,8 +159,8 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(TRIGGER_LINE(5))]	= I(23),
 			[B(TRIGGER_LINE(6))]	= I(24),
 			[B(TRIGGER_LINE(7))]	= I(25),
-			[B(NI_CtrSource(0))]	= I(9),
-			[B(NI_CtrSource(1))]	= I(4),
+			[B(NI_CTRSOURCE(0))]	= I(9),
+			[B(NI_CTRSOURCE(1))]	= I(4),
 			[B(NI_CtrGate(0))]	= I(10),
 			[B(NI_CtrGate(1))]	= I(5),
 			[B(NI_CtrInternalOutput(0))]	= I(13),
@@ -191,8 +191,8 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(TRIGGER_LINE(5))]	= I(23),
 			[B(TRIGGER_LINE(6))]	= I(24),
 			[B(TRIGGER_LINE(7))]	= I(25),
-			[B(NI_CtrSource(0))]	= I(9),
-			[B(NI_CtrSource(1))]	= I(4),
+			[B(NI_CTRSOURCE(0))]	= I(9),
+			[B(NI_CTRSOURCE(1))]	= I(4),
 			[B(NI_CtrGate(0))]	= I(10),
 			[B(NI_CtrGate(1))]	= I(5),
 			[B(NI_CtrInternalOutput(0))]	= I(13),
@@ -223,8 +223,8 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(TRIGGER_LINE(5))]	= I(23),
 			[B(TRIGGER_LINE(6))]	= I(24),
 			[B(TRIGGER_LINE(7))]	= I(25),
-			[B(NI_CtrSource(0))]	= I(9),
-			[B(NI_CtrSource(1))]	= I(4),
+			[B(NI_CTRSOURCE(0))]	= I(9),
+			[B(NI_CTRSOURCE(1))]	= I(4),
 			[B(NI_CtrGate(0))]	= I(10),
 			[B(NI_CtrGate(1))]	= I(5),
 			[B(NI_CtrInternalOutput(0))]	= I(13),
@@ -255,8 +255,8 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(TRIGGER_LINE(5))]	= I(23),
 			[B(TRIGGER_LINE(6))]	= I(24),
 			[B(TRIGGER_LINE(7))]	= I(25),
-			[B(NI_CtrSource(0))]	= I(9),
-			[B(NI_CtrSource(1))]	= I(4),
+			[B(NI_CTRSOURCE(0))]	= I(9),
+			[B(NI_CTRSOURCE(1))]	= I(4),
 			[B(NI_CtrGate(0))]	= I(10),
 			[B(NI_CtrGate(1))]	= I(5),
 			[B(NI_CtrInternalOutput(0))]	= I(13),
@@ -287,8 +287,8 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(TRIGGER_LINE(5))]	= I(23),
 			[B(TRIGGER_LINE(6))]	= I(24),
 			[B(TRIGGER_LINE(7))]	= I(25),
-			[B(NI_CtrSource(0))]	= I(9),
-			[B(NI_CtrSource(1))]	= I(4),
+			[B(NI_CTRSOURCE(0))]	= I(9),
+			[B(NI_CTRSOURCE(1))]	= I(4),
 			[B(NI_CtrGate(0))]	= I(10),
 			[B(NI_CtrGate(1))]	= I(5),
 			[B(NI_CtrInternalOutput(0))]	= I(13),
@@ -319,8 +319,8 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(TRIGGER_LINE(5))]	= I(23),
 			[B(TRIGGER_LINE(6))]	= I(24),
 			[B(TRIGGER_LINE(7))]	= I(25),
-			[B(NI_CtrSource(0))]	= I(9),
-			[B(NI_CtrSource(1))]	= I(4),
+			[B(NI_CTRSOURCE(0))]	= I(9),
+			[B(NI_CTRSOURCE(1))]	= I(4),
 			[B(NI_CtrGate(0))]	= I(10),
 			[B(NI_CtrGate(1))]	= I(5),
 			[B(NI_CtrInternalOutput(0))]	= I(13),
@@ -351,8 +351,8 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(TRIGGER_LINE(5))]	= I(23),
 			[B(TRIGGER_LINE(6))]	= I(24),
 			[B(TRIGGER_LINE(7))]	= I(25),
-			[B(NI_CtrSource(0))]	= I(9),
-			[B(NI_CtrSource(1))]	= I(4),
+			[B(NI_CTRSOURCE(0))]	= I(9),
+			[B(NI_CTRSOURCE(1))]	= I(4),
 			[B(NI_CtrGate(0))]	= I(10),
 			[B(NI_CtrGate(1))]	= I(5),
 			[B(NI_CtrInternalOutput(0))]	= I(13),
@@ -383,8 +383,8 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(TRIGGER_LINE(5))]	= I(23),
 			[B(TRIGGER_LINE(6))]	= I(24),
 			[B(TRIGGER_LINE(7))]	= I(25),
-			[B(NI_CtrSource(0))]	= I(9),
-			[B(NI_CtrSource(1))]	= I(4),
+			[B(NI_CTRSOURCE(0))]	= I(9),
+			[B(NI_CTRSOURCE(1))]	= I(4),
 			[B(NI_CtrGate(0))]	= I(10),
 			[B(NI_CtrGate(1))]	= I(5),
 			[B(NI_CtrInternalOutput(0))]	= I(13),
@@ -415,8 +415,8 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(TRIGGER_LINE(5))]	= I(23),
 			[B(TRIGGER_LINE(6))]	= I(24),
 			[B(TRIGGER_LINE(7))]	= I(25),
-			[B(NI_CtrSource(0))]	= I(9),
-			[B(NI_CtrSource(1))]	= I(4),
+			[B(NI_CTRSOURCE(0))]	= I(9),
+			[B(NI_CTRSOURCE(1))]	= I(4),
 			[B(NI_CtrGate(0))]	= I(10),
 			[B(NI_CtrGate(1))]	= I(5),
 			[B(NI_CtrInternalOutput(0))]	= I(13),
@@ -447,8 +447,8 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(TRIGGER_LINE(5))]	= I(23),
 			[B(TRIGGER_LINE(6))]	= I(24),
 			[B(TRIGGER_LINE(7))]	= I(25),
-			[B(NI_CtrSource(0))]	= I(9),
-			[B(NI_CtrSource(1))]	= I(4),
+			[B(NI_CTRSOURCE(0))]	= I(9),
+			[B(NI_CTRSOURCE(1))]	= I(4),
 			[B(NI_CtrGate(0))]	= I(10),
 			[B(NI_CtrGate(1))]	= I(5),
 			[B(NI_CtrInternalOutput(0))]	= I(13),
@@ -479,8 +479,8 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(TRIGGER_LINE(5))]	= I(23),
 			[B(TRIGGER_LINE(6))]	= I(24),
 			[B(TRIGGER_LINE(7))]	= I(25),
-			[B(NI_CtrSource(0))]	= I(9),
-			[B(NI_CtrSource(1))]	= I(4),
+			[B(NI_CTRSOURCE(0))]	= I(9),
+			[B(NI_CTRSOURCE(1))]	= I(4),
 			[B(NI_CtrGate(0))]	= I(10),
 			[B(NI_CtrGate(1))]	= I(5),
 			[B(NI_CtrInternalOutput(0))]	= I(13),
@@ -511,8 +511,8 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(TRIGGER_LINE(5))]	= I(23),
 			[B(TRIGGER_LINE(6))]	= I(24),
 			[B(TRIGGER_LINE(7))]	= I(25),
-			[B(NI_CtrSource(0))]	= I(9),
-			[B(NI_CtrSource(1))]	= I(4),
+			[B(NI_CTRSOURCE(0))]	= I(9),
+			[B(NI_CTRSOURCE(1))]	= I(4),
 			[B(NI_CtrGate(0))]	= I(10),
 			[B(NI_CtrGate(1))]	= I(5),
 			[B(NI_CtrInternalOutput(0))]	= I(13),
@@ -543,8 +543,8 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(TRIGGER_LINE(5))]	= I(23),
 			[B(TRIGGER_LINE(6))]	= I(24),
 			[B(TRIGGER_LINE(7))]	= I(25),
-			[B(NI_CtrSource(0))]	= I(9),
-			[B(NI_CtrSource(1))]	= I(4),
+			[B(NI_CTRSOURCE(0))]	= I(9),
+			[B(NI_CTRSOURCE(1))]	= I(4),
 			[B(NI_CtrGate(0))]	= I(10),
 			[B(NI_CtrGate(1))]	= I(5),
 			[B(NI_CtrInternalOutput(0))]	= I(13),
@@ -571,7 +571,7 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(NI_RTSI_BRD(1))]	= I(9),
 			[B(NI_RTSI_BRD(2))]	= I(10),
 			[B(NI_RTSI_BRD(3))]	= I(11),
-			[B(NI_CtrSource(0))]	= I(5),
+			[B(NI_CTRSOURCE(0))]	= I(5),
 			[B(NI_CtrGate(0))]	= I(6),
 			[B(NI_AI_StartTrigger)]	= I(0),
 			[B(NI_AI_ReferenceTrigger)]	= I(1),
@@ -592,7 +592,7 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(NI_RTSI_BRD(1))]	= I(9),
 			[B(NI_RTSI_BRD(2))]	= I(10),
 			[B(NI_RTSI_BRD(3))]	= I(11),
-			[B(NI_CtrSource(0))]	= I(5),
+			[B(NI_CTRSOURCE(0))]	= I(5),
 			[B(NI_CtrGate(0))]	= I(6),
 			[B(NI_AI_StartTrigger)]	= I(0),
 			[B(NI_AI_ReferenceTrigger)]	= I(1),
@@ -613,7 +613,7 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(NI_RTSI_BRD(1))]	= I(9),
 			[B(NI_RTSI_BRD(2))]	= I(10),
 			[B(NI_RTSI_BRD(3))]	= I(11),
-			[B(NI_CtrSource(0))]	= I(5),
+			[B(NI_CTRSOURCE(0))]	= I(5),
 			[B(NI_CtrGate(0))]	= I(6),
 			[B(NI_AI_StartTrigger)]	= I(0),
 			[B(NI_AI_ReferenceTrigger)]	= I(1),
@@ -634,7 +634,7 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(NI_RTSI_BRD(1))]	= I(9),
 			[B(NI_RTSI_BRD(2))]	= I(10),
 			[B(NI_RTSI_BRD(3))]	= I(11),
-			[B(NI_CtrSource(0))]	= I(5),
+			[B(NI_CTRSOURCE(0))]	= I(5),
 			[B(NI_CtrGate(0))]	= I(6),
 			[B(NI_AI_StartTrigger)]	= I(0),
 			[B(NI_AI_ReferenceTrigger)]	= I(1),
@@ -655,7 +655,7 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(NI_RTSI_BRD(1))]	= I(9),
 			[B(NI_RTSI_BRD(2))]	= I(10),
 			[B(NI_RTSI_BRD(3))]	= I(11),
-			[B(NI_CtrSource(0))]	= I(5),
+			[B(NI_CTRSOURCE(0))]	= I(5),
 			[B(NI_CtrGate(0))]	= I(6),
 			[B(NI_AI_StartTrigger)]	= I(0),
 			[B(NI_AI_ReferenceTrigger)]	= I(1),
@@ -676,7 +676,7 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(NI_RTSI_BRD(1))]	= I(9),
 			[B(NI_RTSI_BRD(2))]	= I(10),
 			[B(NI_RTSI_BRD(3))]	= I(11),
-			[B(NI_CtrSource(0))]	= I(5),
+			[B(NI_CTRSOURCE(0))]	= I(5),
 			[B(NI_CtrGate(0))]	= I(6),
 			[B(NI_AI_StartTrigger)]	= I(0),
 			[B(NI_AI_ReferenceTrigger)]	= I(1),
@@ -697,7 +697,7 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(NI_RTSI_BRD(1))]	= I(9),
 			[B(NI_RTSI_BRD(2))]	= I(10),
 			[B(NI_RTSI_BRD(3))]	= I(11),
-			[B(NI_CtrSource(0))]	= I(5),
+			[B(NI_CTRSOURCE(0))]	= I(5),
 			[B(NI_CtrGate(0))]	= I(6),
 			[B(NI_AI_StartTrigger)]	= I(0),
 			[B(NI_AI_ReferenceTrigger)]	= I(1),
@@ -718,7 +718,7 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(NI_RTSI_BRD(1))]	= I(9),
 			[B(NI_RTSI_BRD(2))]	= I(10),
 			[B(NI_RTSI_BRD(3))]	= I(11),
-			[B(NI_CtrSource(0))]	= I(5),
+			[B(NI_CTRSOURCE(0))]	= I(5),
 			[B(NI_CtrGate(0))]	= I(6),
 			[B(NI_AI_StartTrigger)]	= I(0),
 			[B(NI_AI_ReferenceTrigger)]	= I(1),
@@ -741,7 +741,7 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(NI_PFI(3))]	= I(3),
 			[B(NI_PFI(4))]	= I(4),
 			[B(NI_PFI(5))]	= I(5),
-			[B(NI_CtrSource(1))]	= I(11),
+			[B(NI_CTRSOURCE(1))]	= I(11),
 			[B(NI_CtrGate(1))]	= I(10),
 			[B(NI_CtrZ(0))]	= I(13),
 			[B(NI_CtrZ(1))]	= I(12),
@@ -759,7 +759,7 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(NI_PFI(3))]	= I(3),
 			[B(NI_PFI(4))]	= I(4),
 			[B(NI_PFI(5))]	= I(5),
-			[B(NI_CtrSource(1))]	= I(11),
+			[B(NI_CTRSOURCE(1))]	= I(11),
 			[B(NI_CtrGate(1))]	= I(10),
 			[B(NI_CtrZ(0))]	= I(13),
 			[B(NI_CtrZ(1))]	= I(12),
@@ -777,7 +777,7 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(NI_PFI(3))]	= I(3),
 			[B(NI_PFI(4))]	= I(4),
 			[B(NI_PFI(5))]	= I(5),
-			[B(NI_CtrSource(1))]	= I(11),
+			[B(NI_CTRSOURCE(1))]	= I(11),
 			[B(NI_CtrGate(1))]	= I(10),
 			[B(NI_CtrZ(0))]	= I(13),
 			[B(NI_CtrZ(1))]	= I(12),
@@ -795,7 +795,7 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(NI_PFI(3))]	= I(3),
 			[B(NI_PFI(4))]	= I(4),
 			[B(NI_PFI(5))]	= I(5),
-			[B(NI_CtrSource(1))]	= I(11),
+			[B(NI_CTRSOURCE(1))]	= I(11),
 			[B(NI_CtrGate(1))]	= I(10),
 			[B(NI_CtrZ(0))]	= I(13),
 			[B(NI_CtrZ(1))]	= I(12),
@@ -806,7 +806,7 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(NI_FrequencyOutput)]	= I(8),
 			[B(NI_AnalogComparisonEvent)]	= I(14),
 		},
-		[B(NI_CtrSource(0))] = {
+		[B(NI_CTRSOURCE(0))] = {
 			/* These are not currently implemented in ni modules */
 			[B(NI_PFI(0))]	= U(1),
 			[B(NI_PFI(1))]	= U(2),
@@ -842,7 +842,7 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(NI_AnalogComparisonEvent)]	= U(Gi_SRC(30, 1)),
 			[B(NI_LogicLow)]	= U(31),
 		},
-		[B(NI_CtrSource(1))] = {
+		[B(NI_CTRSOURCE(1))] = {
 			/* These are not currently implemented in ni modules */
 			[B(NI_PFI(0))]	= U(1),
 			[B(NI_PFI(1))]	= U(2),
@@ -903,7 +903,7 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(TRIGGER_LINE(5))]	= I(16),
 			[B(TRIGGER_LINE(6))]	= I(17),
 			[B(TRIGGER_LINE(7))]	= I(27),
-			[B(NI_CtrSource(1))]	= I(29),
+			[B(NI_CTRSOURCE(1))]	= I(29),
 			/* source for following line:  mhddk GP examples */
 			[B(NI_CtrInternalOutput(1))]	= I(20),
 			[B(PXI_Star)]	= I(19),
@@ -938,7 +938,7 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(TRIGGER_LINE(5))]	= I(16),
 			[B(TRIGGER_LINE(6))]	= I(17),
 			[B(TRIGGER_LINE(7))]	= I(27),
-			[B(NI_CtrSource(0))]	= I(29),
+			[B(NI_CTRSOURCE(0))]	= I(29),
 			/* source for following line:  mhddk GP examples */
 			[B(NI_CtrInternalOutput(0))]	= I(20),
 			[B(PXI_Star)]	= I(19),
@@ -973,7 +973,7 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(TRIGGER_LINE(5))]	= I(16),
 			[B(TRIGGER_LINE(6))]	= I(17),
 			[B(TRIGGER_LINE(7))]	= I(27),
-			[B(NI_CtrSource(1))]	= I(29),
+			[B(NI_CTRSOURCE(1))]	= I(29),
 			/* source for following line:  mhddk GP examples */
 			[B(NI_CtrInternalOutput(1))]	= I(20),
 			[B(PXI_Star)]	= I(19),
@@ -1008,7 +1008,7 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(TRIGGER_LINE(5))]	= I(16),
 			[B(TRIGGER_LINE(6))]	= I(17),
 			[B(TRIGGER_LINE(7))]	= I(27),
-			[B(NI_CtrSource(0))]	= I(29),
+			[B(NI_CTRSOURCE(0))]	= I(29),
 			/* source for following line:  mhddk GP examples */
 			[B(NI_CtrInternalOutput(0))]	= I(20),
 			[B(PXI_Star)]	= I(19),
@@ -1247,7 +1247,7 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(TRIGGER_LINE(5))]	= I(16),
 			[B(TRIGGER_LINE(6))]	= I(17),
 			[B(TRIGGER_LINE(7))]	= I(27),
-			[B(NI_CtrSource(1))]	= I(29),
+			[B(NI_CTRSOURCE(1))]	= I(29),
 			/* source for following line:  mhddk GP examples */
 			[B(NI_CtrInternalOutput(1))]	= I(20),
 			[B(PXI_Star)]	= I(19),
@@ -1282,7 +1282,7 @@ const struct family_route_values ni_mseries_route_values = {
 			[B(TRIGGER_LINE(5))]	= I(16),
 			[B(TRIGGER_LINE(6))]	= I(17),
 			[B(TRIGGER_LINE(7))]	= I(27),
-			[B(NI_CtrSource(0))]	= I(29),
+			[B(NI_CTRSOURCE(0))]	= I(29),
 			/* source for following line:  mhddk GP examples */
 			[B(NI_CtrInternalOutput(0))]	= I(20),
 			[B(PXI_Star)]	= I(19),
diff --git a/drivers/staging/comedi/drivers/ni_routing/tools/ni_names.py b/drivers/staging/comedi/drivers/ni_routing/tools/ni_names.py
index 5f9b825968b1..276fec507dba 100644
--- a/drivers/staging/comedi/drivers/ni_routing/tools/ni_names.py
+++ b/drivers/staging/comedi/drivers/ni_routing/tools/ni_names.py
@@ -14,7 +14,7 @@ ni_macros = (
   'NI_PFI',
   'TRIGGER_LINE',
   'NI_RTSI_BRD',
-  'NI_CtrSource',
+  'NI_CTRSOURCE',
   'NI_CtrGate',
   'NI_CtrAux',
   'NI_CtrA',
diff --git a/drivers/staging/comedi/drivers/ni_tio.c b/drivers/staging/comedi/drivers/ni_tio.c
index b264db32a411..6325d32b99e3 100644
--- a/drivers/staging/comedi/drivers/ni_tio.c
+++ b/drivers/staging/comedi/drivers/ni_tio.c
@@ -1528,7 +1528,7 @@ int ni_tio_get_routing(struct ni_gpct_device *counter_dev, unsigned int dest)
 	/*
 	 * This case is not possible through this interface.  A user must use
 	 * INSN_CONFIG_SET_CLOCK_SRC instead.
-	 * } else if (dest >= NI_CtrSource(0) && dest <= NI_CtrSource(-1)) {
+	 * } else if (dest >= NI_CTRSOURCE(0) && dest <= NI_CTRSOURCE(-1)) {
 	 *	ret = ni_tio_set_clock_src(counter, &reg, &period_ns);
 	 */
 	}
@@ -1569,7 +1569,7 @@ int ni_tio_set_routing(struct ni_gpct_device *counter_dev, unsigned int dest,
 	/*
 	 * This case is not possible through this interface.  A user must use
 	 * INSN_CONFIG_SET_CLOCK_SRC instead.
-	 * } else if (dest >= NI_CtrSource(0) && dest <= NI_CtrSource(-1)) {
+	 * } else if (dest >= NI_CTRSOURCE(0) && dest <= NI_CTRSOURCE(-1)) {
 	 *	ret = ni_tio_set_clock_src(counter, reg, period_ns);
 	 */
 	} else {
@@ -1594,7 +1594,7 @@ int ni_tio_unset_routing(struct ni_gpct_device *counter_dev, unsigned int dest)
 	/*
 	 * This case is not possible through this interface.  A user must use
 	 * INSN_CONFIG_SET_CLOCK_SRC instead.
-	 * if (dest >= NI_CtrSource(0) && dest <= NI_CtrSource(-1))
+	 * if (dest >= NI_CTRSOURCE(0) && dest <= NI_CTRSOURCE(-1))
 	 *	return ni_tio_set_clock_src(counter, reg, period_ns);
 	 */
 
diff --git a/drivers/staging/comedi/drivers/tests/ni_routes_test.c b/drivers/staging/comedi/drivers/tests/ni_routes_test.c
index f809051820ac..52df4b7c8d52 100644
--- a/drivers/staging/comedi/drivers/tests/ni_routes_test.c
+++ b/drivers/staging/comedi/drivers/tests/ni_routes_test.c
@@ -235,8 +235,8 @@ void test_ni_assign_device_routes(void)
 		 "10th pci-6070e route_set is for TRIGGER_LINE(0)\n");
 	unittest(devroutes->routes[10].n_src == 10,
 		 "10th pci-6070e route_set length == 10\n");
-	unittest(devroutes->routes[10].src[0] == NI_CtrSource(0),
-		 "10th pci-6070e route_set src. == NI_CtrSource(0)\n");
+	unittest(devroutes->routes[10].src[0] == NI_CTRSOURCE(0),
+		 "10th pci-6070e route_set src. == NI_CTRSOURCE(0)\n");
 	unittest(route_set_dests_in_order(devroutes),
 		 "all pci-6070e route_sets in order of signal destination\n");
 	unittest(route_set_sources_in_order(devroutes),
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ