Staging: comedi: Remove str_TimerDetails typedef in addi-data/addi_eeprom.c
[safe/jmp/linux-2.6] / drivers / staging / comedi / drivers / pcl818.c
index 9eaabfb..43a9d56 100644 (file)
@@ -244,7 +244,7 @@ static const struct comedi_lrange range718_bipolar0_5 = { 1, {BIP_RANGE(0.5),} }
 static const struct comedi_lrange range718_unipolar2 = { 1, {UNI_RANGE(2),} };
 static const struct comedi_lrange range718_unipolar1 = { 1, {BIP_RANGE(1),} };
 
-static int pcl818_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pcl818_attach(struct comedi_device * dev, struct comedi_devconfig * it);
 static int pcl818_detach(struct comedi_device * dev);
 
 #ifdef unused
@@ -252,7 +252,8 @@ static int RTC_lock = 0;    /* RTC lock */
 static int RTC_timer_lock = 0; /* RTC int lock */
 #endif
 
-typedef struct {
+struct pcl818_board {
+
        const char *name;       // driver name
        int n_ranges;           // len of range list
        int n_aichan_se;        // num of A/D chans in single ended  mode
@@ -270,9 +271,10 @@ typedef struct {
        int ao_maxdata;         // maxdata for D/A
        unsigned char fifo;     // 1=board has FIFO
        int is_818;
-} boardtype;
+};
+
 
-static const boardtype boardtypes[] = {
+static const struct pcl818_board boardtypes[] = {
        {"pcl818l", 4, 16, 8, 25000, 1, 16, 16, &range_pcl818l_l_ai,
                        &range_unipolar5, PCLx1x_RANGE, 0x00fc,
                0x0a, 0xfff, 0xfff, 0, 1},
@@ -297,7 +299,7 @@ static const boardtype boardtypes[] = {
                0x0a, 0xfff, 0xfff, 0, 1 /* XXX ? */ },
 };
 
-#define n_boardtypes (sizeof(boardtypes)/sizeof(boardtype))
+#define n_boardtypes (sizeof(boardtypes)/sizeof(struct pcl818_board))
 
 static struct comedi_driver driver_pcl818 = {
       driver_name:"pcl818",
@@ -306,12 +308,13 @@ static struct comedi_driver driver_pcl818 = {
       detach:pcl818_detach,
       board_name:&boardtypes[0].name,
       num_names:n_boardtypes,
-      offset:sizeof(boardtype),
+      offset:sizeof(struct pcl818_board),
 };
 
 COMEDI_INITCLEANUP(driver_pcl818);
 
-typedef struct {
+struct pcl818_private {
+
        unsigned int dma;       // used DMA, 0=don't use DMA
        int dma_rtc;            // 1=RTC used with DMA, 0=no RTC alloc
        unsigned int io_range;
@@ -356,14 +359,15 @@ typedef struct {
        struct comedi_subdevice *sub_ai;        // ptr to AI subdevice
        unsigned char usefifo;  // 1=use fifo
        unsigned int ao_readback[2];
-} pcl818_private;
+};
+
 
 static const unsigned int muxonechan[] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,     // used for gain list programming
        0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff
 };
 
-#define devpriv ((pcl818_private *)dev->private)
-#define this_board ((const boardtype *)dev->board_ptr)
+#define devpriv ((struct pcl818_private *)dev->private)
+#define this_board ((const struct pcl818_board *)dev->board_ptr)
 
 /*
 ==============================================================================
@@ -388,7 +392,7 @@ static int rtc_setfreq_irq(int freq);
    ANALOG INPUT MODE0, 818 cards, slow version
 */
 static int pcl818_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_insn * insn, unsigned int * data)
+       struct comedi_insn * insn, unsigned int * data)
 {
        int n;
        int timeout;
@@ -435,7 +439,7 @@ static int pcl818_ai_insn_read(struct comedi_device * dev, struct comedi_subdevi
    only one sample per call is supported
 */
 static int pcl818_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_insn * insn, unsigned int * data)
+       struct comedi_insn * insn, unsigned int * data)
 {
        int n;
        int chan = CR_CHAN(insn->chanspec);
@@ -448,7 +452,7 @@ static int pcl818_ao_insn_read(struct comedi_device * dev, struct comedi_subdevi
 }
 
 static int pcl818_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_insn * insn, unsigned int * data)
+       struct comedi_insn * insn, unsigned int * data)
 {
        int n;
        int chan = CR_CHAN(insn->chanspec);
@@ -471,7 +475,7 @@ static int pcl818_ao_insn_write(struct comedi_device * dev, struct comedi_subdev
    only one sample per call is supported
 */
 static int pcl818_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_insn * insn, unsigned int * data)
+       struct comedi_insn * insn, unsigned int * data)
 {
        if (insn->n != 2)
                return -EINVAL;
@@ -489,7 +493,7 @@ static int pcl818_di_insn_bits(struct comedi_device * dev, struct comedi_subdevi
    only one sample per call is supported
 */
 static int pcl818_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_insn * insn, unsigned int * data)
+       struct comedi_insn * insn, unsigned int * data)
 {
        if (insn->n != 2)
                return -EINVAL;
@@ -1675,7 +1679,7 @@ static void free_resources(struct comedi_device * dev)
    Initialization
 
 */
-static int pcl818_attach(struct comedi_device * dev, comedi_devconfig * it)
+static int pcl818_attach(struct comedi_device * dev, struct comedi_devconfig * it)
 {
        int ret;
        unsigned long iobase;
@@ -1683,7 +1687,7 @@ static int pcl818_attach(struct comedi_device * dev, comedi_devconfig * it)
        unsigned long pages;
        struct comedi_subdevice *s;
 
-       if ((ret = alloc_private(dev, sizeof(pcl818_private))) < 0)
+       if ((ret = alloc_private(dev, sizeof(struct pcl818_private))) < 0)
                return ret;     /* Can't alloc mem */
 
        /* claim our I/O space */