Staging: comedi: Remove comedi_lrange typedef

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Bill Pemberton authored and Greg Kroah-Hartman committed 2009-04-03 14:53:56 -07:00
1 parent 139dfbdfac
commit 9ced1de691
69 files changed
+270 -272

No files matched your search

+9 -11
View File
@@ -121,8 +121,6 @@
#define COMEDI_NUM_BOARD_MINORS 0x30
#define COMEDI_FIRST_SUBDEVICE_MINOR COMEDI_NUM_BOARD_MINORS
typedef struct comedi_lrange_struct comedi_lrange;
typedef struct device device_create_result_type;
#define COMEDI_DEVICE_CREATE(cs, parent, devt, drvdata, device, fmt...) \
@@ -154,8 +152,8 @@ struct comedi_subdevice {
unsigned int settling_time_0;
const comedi_lrange *range_table;
const comedi_lrange *const *range_table_list;
const struct comedi_lrange *range_table;
const struct comedi_lrange *const *range_table_list;
unsigned int *chanlist; /* driver-owned chanlist (not used) */
@@ -396,12 +394,12 @@ int insn_inval(struct comedi_device *dev, struct comedi_subdevice *s,
#define BIP_RANGE(a) {-(a)*1e6, (a)*1e6, 0}
#define UNI_RANGE(a) {0, (a)*1e6, 0}
extern const comedi_lrange range_bipolar10;
extern const comedi_lrange range_bipolar5;
extern const comedi_lrange range_bipolar2_5;
extern const comedi_lrange range_unipolar10;
extern const comedi_lrange range_unipolar5;
extern const comedi_lrange range_unknown;
extern const struct comedi_lrange range_bipolar10;
extern const struct comedi_lrange range_bipolar5;
extern const struct comedi_lrange range_bipolar2_5;
extern const struct comedi_lrange range_unipolar10;
extern const struct comedi_lrange range_unipolar5;
extern const struct comedi_lrange range_unknown;
#define range_digital range_unipolar5
@@ -411,7 +409,7 @@ extern const comedi_lrange range_unknown;
#define GCC_ZERO_LENGTH_ARRAY 0
#endif
struct comedi_lrange_struct {
struct comedi_lrange {
int length;
comedi_krange range[GCC_ZERO_LENGTH_ARRAY];
};
@@ -51,7 +51,7 @@ typedef unsigned int ULONG, *PULONG; /* 32-bit */
typedef unsigned int DWORD, *PDWORD; /* 32-bit */
typedef unsigned long ULONG_PTR;
typedef const comedi_lrange *PCRANGE;
typedef const struct comedi_lrange *PCRANGE;
#define LOBYTE(W) (BYTE)((W) & 0xFF)
#define HIBYTE(W) (BYTE)(((W) >> 8) & 0xFF)
@@ -46,7 +46,7 @@
//MODULE INFO STRUCTURE
static const comedi_lrange range_apci1710_ttl = { 4, {
static const struct comedi_lrange range_apci1710_ttl = { 4, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2),
@@ -54,7 +54,7 @@ static const comedi_lrange range_apci1710_ttl = { 4, {
}
};
static const comedi_lrange range_apci1710_ssi = { 4, {
static const struct comedi_lrange range_apci1710_ssi = { 4, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2),
@@ -62,7 +62,7 @@ static const comedi_lrange range_apci1710_ssi = { 4, {
}
};
static const comedi_lrange range_apci1710_inccpt = { 4, {
static const struct comedi_lrange range_apci1710_inccpt = { 4, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2),
@@ -34,7 +34,7 @@ struct {
} Config_Parameters_Main;
/* ANALOG INPUT RANGE */
comedi_lrange range_apci035_ai = { 8, {
struct comedi_lrange range_apci035_ai = { 8, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2),
@@ -41,7 +41,7 @@
#ifdef __KERNEL__
static const comedi_lrange range_apci16xx_ttl = { 12,
static const struct comedi_lrange range_apci16xx_ttl = { 12,
{BIP_RANGE(1),
BIP_RANGE(1),
BIP_RANGE(1),
@@ -21,7 +21,7 @@
// comedi related defines
//ANALOG INPUT RANGE
static const comedi_lrange range_apci3120_ai = { 8, {
static const struct comedi_lrange range_apci3120_ai = { 8, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2),
@@ -34,7 +34,7 @@ static const comedi_lrange range_apci3120_ai = { 8, {
};
// ANALOG OUTPUT RANGE
static const comedi_lrange range_apci3120_ao = { 2, {
static const struct comedi_lrange range_apci3120_ao = { 2, {
BIP_RANGE(10),
UNI_RANGE(10)
}
@@ -35,7 +35,7 @@ struct {
Config_Parameters_Module3, Config_Parameters_Module4;
//ANALOG INPUT RANGE
static const comedi_lrange range_apci3200_ai = { 8, {
static const struct comedi_lrange range_apci3200_ai = { 8, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2),
@@ -47,7 +47,7 @@ static const comedi_lrange range_apci3200_ai = { 8, {
}
};
static const comedi_lrange range_apci3300_ai = { 4, {
static const struct comedi_lrange range_apci3300_ai = { 4, {
UNI_RANGE(10),
UNI_RANGE(5),
UNI_RANGE(2),
@@ -32,7 +32,7 @@
#define MODE0 0
#define MODE1 1
// ANALOG OUTPUT RANGE
comedi_lrange range_apci3501_ao = { 2, {
struct comedi_lrange range_apci3501_ao = { 2, {
BIP_RANGE(10),
UNI_RANGE(10)
}
@@ -32,7 +32,7 @@
#ifdef __KERNEL__
static const comedi_lrange range_apci3XXX_ai = { 8, {BIP_RANGE(10),
static const struct comedi_lrange range_apci3XXX_ai = { 8, {BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2),
BIP_RANGE(1),
@@ -42,7 +42,7 @@ static const comedi_lrange range_apci3XXX_ai = { 8, {BIP_RANGE(10),
UNI_RANGE(1)}
};
static const comedi_lrange range_apci3XXX_ttl = { 12, {BIP_RANGE(1),
static const struct comedi_lrange range_apci3XXX_ttl = { 12, {BIP_RANGE(1),
BIP_RANGE(1),
BIP_RANGE(1),
BIP_RANGE(1),
@@ -56,7 +56,7 @@ static const comedi_lrange range_apci3XXX_ttl = { 12, {BIP_RANGE(1),
BIP_RANGE(1)}
};
static const comedi_lrange range_apci3XXX_ao = { 2, {BIP_RANGE(10),
static const struct comedi_lrange range_apci3XXX_ao = { 2, {BIP_RANGE(10),
UNI_RANGE(10)}
};
#endif
+3 -3
View File
@@ -270,7 +270,7 @@ static int pci9111_detach(struct comedi_device * dev);
static void pci9111_ai_munge(struct comedi_device * dev, struct comedi_subdevice * s,
void *data, unsigned int num_bytes, unsigned int start_chan_index);
static const comedi_lrange pci9111_hr_ai_range = {
static const struct comedi_lrange pci9111_hr_ai_range = {
5,
{
BIP_RANGE(10),
@@ -303,8 +303,8 @@ typedef struct {
int ai_resolution_mask;
int ao_resolution; // resolution of D/A
int ao_resolution_mask;
const comedi_lrange *ai_range_list; // rangelist for A/D
const comedi_lrange *ao_range_list; // rangelist for D/A
const struct comedi_lrange *ai_range_list; // rangelist for A/D
const struct comedi_lrange *ao_range_list; // rangelist for D/A
unsigned int ai_acquisition_period_min_ns;
} pci9111_board_struct;
+4 -4
View File
@@ -152,7 +152,7 @@ Configuration options:
#define EXTTRG_AI 0 /* ext trg is used by AI */
static const comedi_lrange range_pci9118dg_hr = { 8, {
static const struct comedi_lrange range_pci9118dg_hr = { 8, {
BIP_RANGE(5),
BIP_RANGE(2.5),
BIP_RANGE(1.25),
@@ -164,7 +164,7 @@ static const comedi_lrange range_pci9118dg_hr = { 8, {
}
};
static const comedi_lrange range_pci9118hg = { 8, {
static const struct comedi_lrange range_pci9118hg = { 8, {
BIP_RANGE(5),
BIP_RANGE(0.5),
BIP_RANGE(0.05),
@@ -194,8 +194,8 @@ typedef struct {
int n_aochan; // num of D/A chans
int ai_maxdata; // resolution of A/D
int ao_maxdata; // resolution of D/A
const comedi_lrange *rangelist_ai; // rangelist for A/D
const comedi_lrange *rangelist_ao; // rangelist for D/A
const struct comedi_lrange *rangelist_ai; // rangelist for A/D
const struct comedi_lrange *rangelist_ao; // rangelist for D/A
unsigned int ai_ns_min; // max sample speed of card v ns
unsigned int ai_pacer_min; // minimal pacer value (c1*c2 or c1 in burst)
int half_fifo_size; // size of FIFO/2
+2 -2
View File
@@ -100,14 +100,14 @@ If you do not specify any options, they will default to
#define TIMEOUT 20
// available ranges through the PGA gains
static const comedi_lrange range_adq12b_ai_bipolar = { 4, {
static const struct comedi_lrange range_adq12b_ai_bipolar = { 4, {
BIP_RANGE( 5 ),
BIP_RANGE( 2 ),
BIP_RANGE( 1 ),
BIP_RANGE( 0.5 )
}};
static const comedi_lrange range_adq12b_ai_unipolar = { 4, {
static const struct comedi_lrange range_adq12b_ai_unipolar = { 4, {
UNI_RANGE( 5 ),
UNI_RANGE( 2 ),
UNI_RANGE( 1 ),
+7 -7
View File
@@ -121,7 +121,7 @@ Configuration options:
// D/A synchronized control (PCI1720_SYNCONT)
#define Syncont_SC0 1 /* set synchronous output mode */
static const comedi_lrange range_pci1710_3 = { 9, {
static const struct comedi_lrange range_pci1710_3 = { 9, {
BIP_RANGE(5),
BIP_RANGE(2.5),
BIP_RANGE(1.25),
@@ -137,7 +137,7 @@ static const comedi_lrange range_pci1710_3 = { 9, {
static const char range_codes_pci1710_3[] =
{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x10, 0x11, 0x12, 0x13 };
static const comedi_lrange range_pci1710hg = { 12, {
static const struct comedi_lrange range_pci1710hg = { 12, {
BIP_RANGE(5),
BIP_RANGE(0.5),
BIP_RANGE(0.05),
@@ -157,7 +157,7 @@ static const char range_codes_pci1710hg[] =
{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x10, 0x11, 0x12,
0x13 };
static const comedi_lrange range_pci17x1 = { 5, {
static const struct comedi_lrange range_pci17x1 = { 5, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2.5),
@@ -168,7 +168,7 @@ static const comedi_lrange range_pci17x1 = { 5, {
static const char range_codes_pci17x1[] = { 0x00, 0x01, 0x02, 0x03, 0x04 };
static const comedi_lrange range_pci1720 = { 4, {
static const struct comedi_lrange range_pci1720 = { 4, {
UNI_RANGE(5),
UNI_RANGE(10),
BIP_RANGE(5),
@@ -176,7 +176,7 @@ static const comedi_lrange range_pci1720 = { 4, {
}
};
static const comedi_lrange range_pci171x_da = { 2, {
static const struct comedi_lrange range_pci171x_da = { 2, {
UNI_RANGE(5),
UNI_RANGE(10),
}
@@ -199,9 +199,9 @@ typedef struct {
int n_counter; // num of counters
int ai_maxdata; // resolution of A/D
int ao_maxdata; // resolution of D/A
const comedi_lrange *rangelist_ai; // rangelist for A/D
const struct comedi_lrange *rangelist_ai; // rangelist for A/D
const char *rangecode_ai; // range codes for programming
const comedi_lrange *rangelist_ao; // rangelist for D/A
const struct comedi_lrange *rangelist_ao; // rangelist for D/A
unsigned int ai_ns_min; // max sample speed of card v ns
unsigned int fifo_half_size; // size of FIFO/2
} boardtype;
+2 -2
View File
@@ -94,7 +94,7 @@ TODO:
//static unsigned short pci_list_builded=0; /*=1 list of card is know */
static const comedi_lrange range_pci1723 = { 1, {
static const struct comedi_lrange range_pci1723 = { 1, {
BIP_RANGE(10)
}
};
@@ -111,7 +111,7 @@ typedef struct pci1723_board_struct {
int n_aochan; // num of D/A chans
int n_diochan; // num of DIO chans
int ao_maxdata; // resolution of D/A
const comedi_lrange *rangelist_ao; // rangelist for D/A
const struct comedi_lrange *rangelist_ao; // rangelist for D/A
} boardtype;
static const boardtype boardtypes[] = {
+1 -1
View File
@@ -151,7 +151,7 @@ static int aio_aio12_8_ao_write(struct comedi_device * dev, struct comedi_subdev
return insn->n;
}
static const comedi_lrange range_aio_aio12_8 = {
static const struct comedi_lrange range_aio_aio12_8 = {
4,
{
UNI_RANGE(5),
@@ -278,7 +278,7 @@ Caveats:
*/
/* The software selectable internal ranges for PCI224 (option[2] == 0). */
static const comedi_lrange range_pci224_internal = {
static const struct comedi_lrange range_pci224_internal = {
8,
{
BIP_RANGE(10),
@@ -304,7 +304,7 @@ static const unsigned short hwrange_pci224_internal[8] = {
};
/* The software selectable external ranges for PCI224 (option[2] == 1). */
static const comedi_lrange range_pci224_external = {
static const struct comedi_lrange range_pci224_external = {
2,
{
RANGE_ext(-1, 1), /* bipolar [-Vref,+Vref] */
@@ -319,7 +319,7 @@ static const unsigned short hwrange_pci224_external[2] = {
/* The hardware selectable Vref*2 external range for PCI234
* (option[2] == 1, option[3+n] == 0). */
static const comedi_lrange range_pci234_ext2 = {
static const struct comedi_lrange range_pci234_ext2 = {
1,
{
RANGE_ext(-2, 2),
@@ -328,7 +328,7 @@ static const comedi_lrange range_pci234_ext2 = {
/* The hardware selectable Vref external range for PCI234
* (option[2] == 1, option[3+n] == 1). */
static const comedi_lrange range_pci234_ext = {
static const struct comedi_lrange range_pci234_ext = {
1,
{
RANGE_ext(-1, 1),
@@ -1417,10 +1417,10 @@ static int pci224_attach(struct comedi_device * dev, comedi_devconfig * it)
/* Sort out channel range options. */
if (thisboard->model == pci234_model) {
/* PCI234 range options. */
const comedi_lrange **range_table_list;
const struct comedi_lrange **range_table_list;
s->range_table_list = range_table_list =
kmalloc(sizeof(comedi_lrange *) * s->n_chan,
kmalloc(sizeof(struct comedi_lrange *) * s->n_chan,
GFP_KERNEL);
if (!s->range_table_list) {
return -ENOMEM;
@@ -568,7 +568,7 @@ static const unsigned int pci230_timebase[8] = {
};
/* PCI230 analogue input range table */
static const comedi_lrange pci230_ai_range = { 7, {
static const struct comedi_lrange pci230_ai_range = { 7, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2.5),
@@ -586,7 +586,7 @@ static const unsigned char pci230_ai_gain[7] = { 0, 1, 2, 3, 1, 2, 3 };
static const unsigned char pci230_ai_bipolar[7] = { 1, 1, 1, 1, 0, 0, 0 };
/* PCI230 analogue output range table */
static const comedi_lrange pci230_ao_range = { 2, {
static const struct comedi_lrange pci230_ao_range = { 2, {
UNI_RANGE(10),
BIP_RANGE(10)
}
+1 -1
View File
@@ -100,7 +100,7 @@ static struct comedi_driver driver_das16cs = {
static struct pcmcia_device *cur_dev = NULL;
static const comedi_lrange das16cs_ai_range = { 4, {
static const struct comedi_lrange das16cs_ai_range = { 4, {
RANGE(-10, 10),
RANGE(-5, 5),
RANGE(-2.5, 2.5),
+4 -4
View File
@@ -196,7 +196,7 @@ static inline unsigned int DAC_DATA_REG(unsigned int channel)
// bit in hexadecimal representation of range index that indicates unipolar input range
#define IS_UNIPOLAR 0x4
// analog input ranges for most boards
static const comedi_lrange cb_pcidas_ranges = {
static const struct comedi_lrange cb_pcidas_ranges = {
8,
{
BIP_RANGE(10),
@@ -211,7 +211,7 @@ static const comedi_lrange cb_pcidas_ranges = {
};
// pci-das1001 input ranges
static const comedi_lrange cb_pcidas_alt_ranges = {
static const struct comedi_lrange cb_pcidas_alt_ranges = {
8,
{
BIP_RANGE(10),
@@ -226,7 +226,7 @@ static const comedi_lrange cb_pcidas_alt_ranges = {
};
// analog output ranges
static const comedi_lrange cb_pcidas_ao_ranges = {
static const struct comedi_lrange cb_pcidas_ao_ranges = {
4,
{
BIP_RANGE(5),
@@ -252,7 +252,7 @@ typedef struct cb_pcidas_board_struct {
int has_ao_fifo; // analog output has fifo
int ao_scan_speed; // analog output speed for 1602 series (for a scan, not conversion)
int fifo_size; // number of samples fifo can hold
const comedi_lrange *ranges;
const struct comedi_lrange *ranges;
enum trimpot_model trimpot;
unsigned has_dac08:1;
} cb_pcidas_board;
+11 -11
View File
@@ -400,7 +400,7 @@ static inline uint8_t attenuate_bit(unsigned int channel)
};
// analog input ranges for 64xx boards
static const comedi_lrange ai_ranges_64xx = {
static const struct comedi_lrange ai_ranges_64xx = {
8,
{
BIP_RANGE(10),
@@ -415,7 +415,7 @@ static const comedi_lrange ai_ranges_64xx = {
};
/* analog input ranges for 60xx boards */
static const comedi_lrange ai_ranges_60xx = {
static const struct comedi_lrange ai_ranges_60xx = {
4,
{
BIP_RANGE(10),
@@ -426,7 +426,7 @@ static const comedi_lrange ai_ranges_60xx = {
};
/* analog input ranges for 6030, etc boards */
static const comedi_lrange ai_ranges_6030 = {
static const struct comedi_lrange ai_ranges_6030 = {
14,
{
BIP_RANGE(10),
@@ -447,7 +447,7 @@ static const comedi_lrange ai_ranges_6030 = {
};
/* analog input ranges for 6052, etc boards */
static const comedi_lrange ai_ranges_6052 = {
static const struct comedi_lrange ai_ranges_6052 = {
15,
{
BIP_RANGE(10),
@@ -469,7 +469,7 @@ static const comedi_lrange ai_ranges_6052 = {
};
// analog input ranges for 4020 board
static const comedi_lrange ai_ranges_4020 = {
static const struct comedi_lrange ai_ranges_4020 = {
2,
{
BIP_RANGE(5),
@@ -478,7 +478,7 @@ static const comedi_lrange ai_ranges_4020 = {
};
// analog output ranges
static const comedi_lrange ao_ranges_64xx = {
static const struct comedi_lrange ao_ranges_64xx = {
4,
{
BIP_RANGE(5),
@@ -494,7 +494,7 @@ static const int ao_range_code_64xx[] = {
0x3,
};
static const comedi_lrange ao_ranges_60xx = {
static const struct comedi_lrange ao_ranges_60xx = {
1,
{
BIP_RANGE(10),
@@ -504,7 +504,7 @@ static const int ao_range_code_60xx[] = {
0x0,
};
static const comedi_lrange ao_ranges_6030 = {
static const struct comedi_lrange ao_ranges_6030 = {
2,
{
BIP_RANGE(10),
@@ -516,7 +516,7 @@ static const int ao_range_code_6030[] = {
0x2,
};
static const comedi_lrange ao_ranges_4020 = {
static const struct comedi_lrange ao_ranges_4020 = {
2,
{
BIP_RANGE(5),
@@ -547,11 +547,11 @@ typedef struct pcidas64_board_struct {
int ai_se_chans; // number of ai inputs in single-ended mode
int ai_bits; // analog input resolution
int ai_speed; // fastest conversion period in ns
const comedi_lrange *ai_range_table;
const struct comedi_lrange *ai_range_table;
int ao_nchan; // number of analog out channels
int ao_bits; // analog output resolution
int ao_scan_speed; // analog output speed (for a scan, not conversion)
const comedi_lrange *ao_range_table;
const struct comedi_lrange *ao_range_table;
const int *ao_range_code;
const hw_fifo_info_t *const ai_fifo;
enum register_layout layout; // different board families have slightly different registers
Loaded 20 of 69 files, more files were not shown because too many files have changed in this diff. Show more