get rid of underscores in my byte swapping calls
authorFrank Mori Hess <fmhess@speakeasy.net>
Sat, 18 Oct 2003 14:13:20 +0000 (14:13 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Sat, 18 Oct 2003 14:13:20 +0000 (14:13 +0000)
comedi/drivers/adl_pci9118.c
comedi/drivers/das16.c
comedi/drivers/gsc_hpdi.c
comedi/drivers/ni_mio_common.c

index 7bfe1249fe9473c35eee6e9250f1b7c0b2380ba7..0f10e9665223204f34d5070312f921d657dcd2c2 100644 (file)
@@ -519,7 +519,7 @@ static void pci9118_ai_munge(comedi_device *dev, comedi_subdevice *s, void *data
 
        for (i = 0; i < num_samples; i++) {
                if(devpriv->usedma)
-                       array[i] = __be16_to_cpu(array[i]);
+                       array[i] = be16_to_cpu(array[i]);
                if (devpriv->ai16bits) {
                        array[i] ^= 0x8000;
                } else {
index 254d8f621198a7e4c5c3134ebba032bff8c817c0..9b09a997357076a85a182b879365cfea8c549b5a 100644 (file)
@@ -1726,7 +1726,7 @@ static void das16_ai_munge(comedi_device *dev, comedi_subdevice *s, void *array,
 
        for(i = 0; i < num_samples; i++)
        {
-               data[i] = __le16_to_cpu(data[i]);
+               data[i] = le16_to_cpu(data[i]);
                if( thisboard->ai_nbits == 12 )
                {
                        data[i] = (data[i] >> 4) & 0xfff;
index 3183ae753bd72eb56d3edfd45d0d0620ef1789da..5281ef48024cce22bc335667f23ffba3f1b5b393 100644 (file)
@@ -498,11 +498,11 @@ static int setup_dma_descriptors( comedi_device *dev, unsigned int transfer_size
        for( i = 0; i < NUM_DMA_DESCRIPTORS &&
                buffer_index < NUM_DMA_BUFFERS; i++ )
        {
-               priv(dev)->dma_desc[ i ].pci_start_addr = __cpu_to_le32(priv(dev)->dio_buffer_phys_addr[ buffer_index ] +
+               priv(dev)->dma_desc[ i ].pci_start_addr = cpu_to_le32(priv(dev)->dio_buffer_phys_addr[ buffer_index ] +
                        buffer_offset);
-               priv(dev)->dma_desc[ i ].local_start_addr = __cpu_to_le32(FIFO_REG);
-               priv(dev)->dma_desc[ i ].transfer_size = __cpu_to_le32(transfer_size);
-               priv(dev)->dma_desc[ i ].next = __cpu_to_le32(( priv(dev)->dma_desc_phys_addr +
+               priv(dev)->dma_desc[ i ].local_start_addr = cpu_to_le32(FIFO_REG);
+               priv(dev)->dma_desc[ i ].transfer_size = cpu_to_le32(transfer_size);
+               priv(dev)->dma_desc[ i ].next = cpu_to_le32(( priv(dev)->dma_desc_phys_addr +
                        ( i + 1 ) * sizeof( priv(dev)->dma_desc[ 0 ] ) ) | next_bits);
 
                priv(dev)->desc_dio_buffer[ i ] = priv(dev)->dio_buffer[ buffer_index ] +
@@ -523,7 +523,7 @@ static int setup_dma_descriptors( comedi_device *dev, unsigned int transfer_size
        priv(dev)->num_dma_descriptors = i;
        // fix last descriptor to point back to first
        priv(dev)->dma_desc[ i - 1 ].next =
-               __cpu_to_le32(priv(dev)->dma_desc_phys_addr | next_bits);
+               cpu_to_le32(priv(dev)->dma_desc_phys_addr | next_bits);
        DEBUG_PRINT(" desc %i next fixup 0x%lx\n", i - 1,
                (unsigned long) priv(dev)->dma_desc[ i - 1 ].next );
 
@@ -883,8 +883,8 @@ static void drain_dma_buffers(comedi_device *dev, unsigned int channel)
        // loop until we have read all the full buffers
        j = 0;
        for(next_transfer_addr = readl(pci_addr_reg);
-               (next_transfer_addr < __le32_to_cpu(priv(dev)->dma_desc[ priv(dev)->dma_desc_index ].pci_start_addr) ||
-               next_transfer_addr >= __le32_to_cpu(priv(dev)->dma_desc[ priv(dev)->dma_desc_index ].pci_start_addr) +
+               (next_transfer_addr < le32_to_cpu(priv(dev)->dma_desc[ priv(dev)->dma_desc_index ].pci_start_addr) ||
+               next_transfer_addr >= le32_to_cpu(priv(dev)->dma_desc[ priv(dev)->dma_desc_index ].pci_start_addr) +
                priv(dev)->block_size ) &&
                j < priv(dev)->num_dma_descriptors;
                j++ )
index ba0c07eb0e1a7b8c0e942e14b76a7067ae84d53f..8bb8cec72097fb2bf3af17c3b00397c09ea48b1f 100644 (file)
@@ -992,7 +992,7 @@ static void ni_ai_munge(comedi_device *dev, comedi_subdevice *s,
        for(i = 0; i < length; i++)
        {
 #ifdef PCIDMA
-               array[i] = __le16_to_cpu(array[i]);
+               array[i] = le16_to_cpu(array[i]);
 #endif
                array[i] += devpriv->ai_offset[ chan_index ];
                chan_index++;
@@ -1954,7 +1954,7 @@ static void ni_ao_munge(comedi_device *dev, comedi_subdevice *s,
                if(boardtype.ao_unipolar == 0 || (range & 1) == 0 )
                        array[i] -= offset;
 #ifdef PCIDMA
-               array[i] = __cpu_to_le16( array[i] );
+               array[i] = cpu_to_le16( array[i] );
 #endif
                chan_index++;
                chan_index %= async->cmd.chanlist_len;