From d65788d7bf047f1d8eefb3a8366231518a6da8de Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Mon, 28 Apr 2008 16:53:05 +0000 Subject: [PATCH] Made some data 'const'. --- comedi/drivers/addi-data/addi_amcc_s5933.h | 2 +- comedi/drivers/addi-data/addi_common.c | 2 +- comedi/drivers/addi-data/addi_common.h | 8 ++++---- comedi/drivers/addi-data/hwdrv_APCI1710.h | 6 +++--- comedi/drivers/addi-data/hwdrv_apci16xx.h | 2 +- comedi/drivers/addi-data/hwdrv_apci3120.h | 4 ++-- comedi/drivers/addi-data/hwdrv_apci3200.h | 4 ++-- comedi/drivers/addi-data/hwdrv_apci3xxx.h | 6 +++--- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/comedi/drivers/addi-data/addi_amcc_s5933.h b/comedi/drivers/addi-data/addi_amcc_s5933.h index ed0b5a3e..113535e0 100644 --- a/comedi/drivers/addi-data/addi_amcc_s5933.h +++ b/comedi/drivers/addi-data/addi_amcc_s5933.h @@ -244,7 +244,7 @@ struct pcilst_struct { struct pcilst_struct *amcc_devices; // ptr to root list of all amcc devices -int i_ADDIDATADeviceID[] = { 0x15B8, 0x10E8 }; +static const int i_ADDIDATADeviceID[] = { 0x15B8, 0x10E8 }; /****************************************************************************/ diff --git a/comedi/drivers/addi-data/addi_common.c b/comedi/drivers/addi-data/addi_common.c index 470c6915..d51ac2cb 100644 --- a/comedi/drivers/addi-data/addi_common.c +++ b/comedi/drivers/addi-data/addi_common.c @@ -139,7 +139,7 @@ void fpu_end(void) #define COMEDI_SUBD_TTLIO 11 /* Digital Input Output But TTL */ #endif -static boardtype boardtypes[] = { +static const boardtype boardtypes[] = { #ifdef CONFIG_APCI_3120 {"apci3120", APCI3120_BOARD_VENDOR_ID, diff --git a/comedi/drivers/addi-data/addi_common.h b/comedi/drivers/addi-data/addi_common.h index c25e6f6f..9f108313 100644 --- a/comedi/drivers/addi-data/addi_common.h +++ b/comedi/drivers/addi-data/addi_common.h @@ -78,7 +78,7 @@ typedef unsigned int ULONG, *PULONG; /* 32-bit */ typedef unsigned int DWORD, *PDWORD; /* 32-bit */ typedef unsigned long ULONG_PTR; -typedef comedi_lrange *PRANGE; +typedef const comedi_lrange *PCRANGE; #define LOBYTE(W) (BYTE )((W)&0xFF) #define HIBYTE(W) (BYTE )(((W)>>8)&0xFF) #define MAKEWORD(H,L) (USHORT )((L)|( (H)<<8) ) @@ -120,15 +120,15 @@ typedef struct { INT i_NbrAoChannel; // num of D/A chans INT i_AiMaxdata; // resolution of A/D INT i_AoMaxdata; // resolution of D/A - PRANGE pr_AiRangelist; // rangelist for A/D - PRANGE pr_AoRangelist; // rangelist for D/A + PCRANGE pr_AiRangelist; // rangelist for A/D + PCRANGE pr_AoRangelist; // rangelist for D/A INT i_NbrDiChannel; // Number of DI channels INT i_NbrDoChannel; // Number of DO channels INT i_DoMaxdata; // data to set all chanels high INT i_NbrTTLChannel; // Number of TTL channels - PRANGE pr_TTLRangelist; // rangelist for TTL + PCRANGE pr_TTLRangelist; // rangelist for TTL INT i_Dma; // dma present or not INT i_Timer; // timer subdevice present or not diff --git a/comedi/drivers/addi-data/hwdrv_APCI1710.h b/comedi/drivers/addi-data/hwdrv_APCI1710.h index f678eead..51cfa340 100644 --- a/comedi/drivers/addi-data/hwdrv_APCI1710.h +++ b/comedi/drivers/addi-data/hwdrv_APCI1710.h @@ -53,7 +53,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc //MODULE INFO STRUCTURE -comedi_lrange range_apci1710_ttl = { 4, { +static const comedi_lrange range_apci1710_ttl = { 4, { BIP_RANGE(10), BIP_RANGE(5), BIP_RANGE(2), @@ -61,7 +61,7 @@ comedi_lrange range_apci1710_ttl = { 4, { } }; -comedi_lrange range_apci1710_ssi = { 4, { +static const comedi_lrange range_apci1710_ssi = { 4, { BIP_RANGE(10), BIP_RANGE(5), BIP_RANGE(2), @@ -69,7 +69,7 @@ comedi_lrange range_apci1710_ssi = { 4, { } }; -comedi_lrange range_apci1710_inccpt = { 4, { +static const comedi_lrange range_apci1710_inccpt = { 4, { BIP_RANGE(10), BIP_RANGE(5), BIP_RANGE(2), diff --git a/comedi/drivers/addi-data/hwdrv_apci16xx.h b/comedi/drivers/addi-data/hwdrv_apci16xx.h index 4f56eb1c..03dd22bb 100755 --- a/comedi/drivers/addi-data/hwdrv_apci16xx.h +++ b/comedi/drivers/addi-data/hwdrv_apci16xx.h @@ -48,7 +48,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc #ifdef __KERNEL__ -comedi_lrange range_apci16xx_ttl = { 12, +static const comedi_lrange range_apci16xx_ttl = { 12, {BIP_RANGE(1), BIP_RANGE(1), BIP_RANGE(1), diff --git a/comedi/drivers/addi-data/hwdrv_apci3120.h b/comedi/drivers/addi-data/hwdrv_apci3120.h index e7536e51..34a4db66 100644 --- a/comedi/drivers/addi-data/hwdrv_apci3120.h +++ b/comedi/drivers/addi-data/hwdrv_apci3120.h @@ -59,7 +59,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc // comedi related defines //ANALOG INPUT RANGE -comedi_lrange range_apci3120_ai = { 8, { +static const comedi_lrange range_apci3120_ai = { 8, { BIP_RANGE(10), BIP_RANGE(5), BIP_RANGE(2), @@ -72,7 +72,7 @@ comedi_lrange range_apci3120_ai = { 8, { }; // ANALOG OUTPUT RANGE -comedi_lrange range_apci3120_ao = { 2, { +static const comedi_lrange range_apci3120_ao = { 2, { BIP_RANGE(10), UNI_RANGE(10) } diff --git a/comedi/drivers/addi-data/hwdrv_apci3200.h b/comedi/drivers/addi-data/hwdrv_apci3200.h index e352f476..1e995568 100644 --- a/comedi/drivers/addi-data/hwdrv_apci3200.h +++ b/comedi/drivers/addi-data/hwdrv_apci3200.h @@ -42,7 +42,7 @@ struct { Config_Parameters_Module3, Config_Parameters_Module4; //ANALOG INPUT RANGE -comedi_lrange range_apci3200_ai = { 8, { +static const comedi_lrange range_apci3200_ai = { 8, { BIP_RANGE(10), BIP_RANGE(5), BIP_RANGE(2), @@ -54,7 +54,7 @@ comedi_lrange range_apci3200_ai = { 8, { } }; -comedi_lrange range_apci3300_ai = { 4, { +static const comedi_lrange range_apci3300_ai = { 4, { UNI_RANGE(10), UNI_RANGE(5), UNI_RANGE(2), diff --git a/comedi/drivers/addi-data/hwdrv_apci3xxx.h b/comedi/drivers/addi-data/hwdrv_apci3xxx.h index 0da6dc20..5ea87897 100755 --- a/comedi/drivers/addi-data/hwdrv_apci3xxx.h +++ b/comedi/drivers/addi-data/hwdrv_apci3xxx.h @@ -39,7 +39,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc #ifdef __KERNEL__ -comedi_lrange range_apci3XXX_ai = { 8, {BIP_RANGE(10), +static const comedi_lrange range_apci3XXX_ai = { 8, {BIP_RANGE(10), BIP_RANGE(5), BIP_RANGE(2), BIP_RANGE(1), @@ -49,7 +49,7 @@ comedi_lrange range_apci3XXX_ai = { 8, {BIP_RANGE(10), UNI_RANGE(1)} }; -comedi_lrange range_apci3XXX_ttl = { 12, {BIP_RANGE(1), +static const comedi_lrange range_apci3XXX_ttl = { 12, {BIP_RANGE(1), BIP_RANGE(1), BIP_RANGE(1), BIP_RANGE(1), @@ -63,7 +63,7 @@ comedi_lrange range_apci3XXX_ttl = { 12, {BIP_RANGE(1), BIP_RANGE(1)} }; -comedi_lrange range_apci3XXX_ao = { 2, {BIP_RANGE(10), +static const comedi_lrange range_apci3XXX_ao = { 2, {BIP_RANGE(10), UNI_RANGE(10)} }; #endif -- 2.26.2