drivers/net/irda: endianness, NULL noise
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 23 Aug 2007 04:54:10 +0000 (00:54 -0400)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:52:02 +0000 (16:52 -0700)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/irda/mcs7780.c
drivers/net/irda/sir_dev.c
drivers/net/irda/stir4200.c
drivers/net/irda/vlsi_ir.h

index 808939b9f8fba7f584a29f7a76bd599ae37410c0..0b769192d4ce0753c872410c601a1e2eb4849a8e 100644 (file)
@@ -464,7 +464,7 @@ static void mcs_unwrap_fir(struct mcs_cb *mcs, __u8 *buf, int len)
        }
 
        fcs = ~(crc32_le(~0, buf, new_len));
-       if(fcs != le32_to_cpu(get_unaligned((u32 *)(buf+new_len)))) {
+       if(fcs != le32_to_cpu(get_unaligned((__le32 *)(buf+new_len)))) {
                IRDA_ERROR("crc error calc 0x%x len %d\n", fcs, new_len);
                mcs->stats.rx_errors++;
                mcs->stats.rx_crc_errors++;
index bbe4e094c42482be7509058e5a808e9cad236a07..6078e03de9a83d256368cf61a4c7be4710b7e612 100644 (file)
@@ -414,7 +414,7 @@ EXPORT_SYMBOL(sirdev_raw_read);
 int sirdev_set_dtr_rts(struct sir_dev *dev, int dtr, int rts)
 {
        int ret = -ENXIO;
-       if (dev->drv->set_dtr_rts != 0)
+       if (dev->drv->set_dtr_rts)
                ret =  dev->drv->set_dtr_rts(dev, dtr, rts);
        return ret;
 }
index 1afaee0fa7e067d4c0759fa4c71b81204e67ba6d..042bc2f0417d8615318bffc479d7d0614b547401 100644 (file)
@@ -332,7 +332,7 @@ static void fir_eof(struct stir_cb *stir)
        }
 
        fcs = ~(crc32_le(~0, rx_buff->data, len));
-       if (fcs != le32_to_cpu(get_unaligned((u32 *)(rx_buff->data+len)))) {
+       if (fcs != le32_to_cpu(get_unaligned((__le32 *)(rx_buff->data+len)))) {
                pr_debug("crc error calc 0x%x len %d\n", fcs, len);
                stir->stats.rx_errors++;
                stir->stats.rx_crc_errors++;
index ca12a60964199b162bb7b3782995156944414742..c8b9c74eea524249c443a1e1faa28865ccd5e81d 100644 (file)
@@ -537,10 +537,10 @@ calc_width_bits(unsigned baudrate, unsigned widthselect, unsigned clockselect)
  */
 
 struct ring_descr_hw {
-       volatile u16    rd_count;       /* tx/rx count [11:0] */
-       u16             reserved;
+       volatile __le16 rd_count;       /* tx/rx count [11:0] */
+       __le16          reserved;
        union {
-               u32     addr;           /* [23:0] of the buffer's busaddress */
+               __le32  addr;           /* [23:0] of the buffer's busaddress */
                struct {
                        u8              addr_res[3];
                        volatile u8     status;         /* descriptor status */