Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
[pandora-kernel.git] / drivers / staging / comedi / drivers / daqboard2000.c
index adda2c4..3b8444f 100644 (file)
@@ -167,7 +167,7 @@ static const struct comedi_lrange range_daqboard2000_ao = { 1, {
        }
 };
 
-typedef struct daqboard2000_hw {
+struct daqboard2000_hw {
        volatile u16 acqControl;        // 0x00
        volatile u16 acqScanListFIFO;   // 0x02
        volatile u32 acqPacerClockDivLow;       // 0x04
@@ -215,7 +215,7 @@ typedef struct daqboard2000_hw {
        volatile u16 trigDacs;  // 0xbc
        volatile u16 fill14;    // 0xbe
        volatile s16 dioP2ExpansionIO16Bit[32]; // 0xc0
-} daqboard2000_hw;
+};
 
 /* Scan Sequencer programming */
 #define DAQBOARD2000_SeqStartScanList            0x0011
@@ -296,7 +296,7 @@ typedef struct daqboard2000_hw {
 #define DAQBOARD2000_PosRefDacSelect             0x0100
 #define DAQBOARD2000_NegRefDacSelect             0x0000
 
-static int daqboard2000_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int daqboard2000_attach(struct comedi_device * dev, struct comedi_devconfig * it);
 static int daqboard2000_detach(struct comedi_device * dev);
 
 static struct comedi_driver driver_daqboard2000 = {
@@ -306,17 +306,17 @@ static struct comedi_driver driver_daqboard2000 = {
       detach:daqboard2000_detach,
 };
 
-typedef struct {
+struct daq200_boardtype {
        const char *name;
        int id;
-} boardtype;
-static const boardtype boardtypes[] = {
+};
+static const struct daq200_boardtype boardtypes[] = {
        {"ids2", DAQBOARD2000_SUBSYSTEM_IDS2},
        {"ids4", DAQBOARD2000_SUBSYSTEM_IDS4},
 };
 
-#define n_boardtypes (sizeof(boardtypes)/sizeof(boardtype))
-#define this_board ((const boardtype *)dev->board_ptr)
+#define n_boardtypes (sizeof(boardtypes)/sizeof(struct daq200_boardtype))
+#define this_board ((const struct daq200_boardtype *)dev->board_ptr)
 
 static DEFINE_PCI_DEVICE_TABLE(daqboard2000_pci_table) = {
        {0x1616, 0x0409, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
@@ -325,7 +325,7 @@ static DEFINE_PCI_DEVICE_TABLE(daqboard2000_pci_table) = {
 
 MODULE_DEVICE_TABLE(pci, daqboard2000_pci_table);
 
-typedef struct {
+struct daqboard2000_private {
        enum {
                card_daqboard_2000
        } card;
@@ -334,13 +334,13 @@ typedef struct {
        void *plx;
        int got_regions;
        unsigned int ao_readback[2];
-} daqboard2000_private;
+};
 
-#define devpriv ((daqboard2000_private*)dev->private)
+#define devpriv ((struct daqboard2000_private *)dev->private)
 
 static void writeAcqScanListEntry(struct comedi_device * dev, u16 entry)
 {
-       daqboard2000_hw *fpga = devpriv->daq;
+       struct daqboard2000_hw *fpga = devpriv->daq;
 
 //  comedi_udelay(4);
        fpga->acqScanListFIFO = entry & 0x00ff;
@@ -397,7 +397,7 @@ static int daqboard2000_ai_insn_read(struct comedi_device * dev, struct comedi_s
        struct comedi_insn * insn, unsigned int * data)
 {
        int i;
-       daqboard2000_hw *fpga = devpriv->daq;
+       struct daqboard2000_hw *fpga = devpriv->daq;
        int gain, chan, timeout;
 
        fpga->acqControl =
@@ -468,7 +468,7 @@ static int daqboard2000_ao_insn_write(struct comedi_device * dev, struct comedi_
 {
        int i;
        int chan = CR_CHAN(insn->chanspec);
-       daqboard2000_hw *fpga = devpriv->daq;
+       struct daqboard2000_hw *fpga = devpriv->daq;
        int timeout;
 
        for (i = 0; i < insn->n; i++) {
@@ -620,7 +620,7 @@ static void daqboard2000_adcStopDmaTransfer(struct comedi_device * dev)
 
 static void daqboard2000_adcDisarm(struct comedi_device * dev)
 {
-       daqboard2000_hw *fpga = devpriv->daq;
+       struct daqboard2000_hw *fpga = devpriv->daq;
 
        /* Disable hardware triggers */
        comedi_udelay(2);
@@ -642,7 +642,7 @@ static void daqboard2000_adcDisarm(struct comedi_device * dev)
 
 static void daqboard2000_activateReferenceDacs(struct comedi_device * dev)
 {
-       daqboard2000_hw *fpga = devpriv->daq;
+       struct daqboard2000_hw *fpga = devpriv->daq;
        int timeout;
 
        // Set the + reference dac value in the FPGA
@@ -717,7 +717,7 @@ static int daqboard2000_8255_cb(int dir, int port, int data,
        return result;
 }
 
-static int daqboard2000_attach(struct comedi_device * dev, comedi_devconfig * it)
+static int daqboard2000_attach(struct comedi_device * dev, struct comedi_devconfig * it)
 {
        int result = 0;
        struct comedi_subdevice *s;
@@ -731,7 +731,7 @@ static int daqboard2000_attach(struct comedi_device * dev, comedi_devconfig * it
        bus = it->options[0];
        slot = it->options[1];
 
-       result = alloc_private(dev, sizeof(daqboard2000_private));
+       result = alloc_private(dev, sizeof(struct daqboard2000_private));
        if (result < 0) {
                return -ENOMEM;
        }