]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (8725): drx397xD.c sparse annotations
authorHarvey Harrison <harvey.harrison@gmail.com>
Wed, 20 Aug 2008 23:44:50 +0000 (20:44 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 12 Oct 2008 11:36:51 +0000 (09:36 -0200)
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/drx397xD.c
drivers/media/dvb/frontends/drx397xD.h

index 77dd4f2c6260359a80d093970eaaa9b47f3dcd03..0cf3af2f7da29f8a1155c810c7bc5fdb6e3b8604 100644 (file)
@@ -235,11 +235,11 @@ exit_rc:
 }
 
 /* Function is not endian safe, use the RD16 wrapper below */
-static int _read16(struct drx397xD_state *s, u32 i2c_adr)
+static int _read16(struct drx397xD_state *s, __le32 i2c_adr)
 {
        int rc;
        u8 a[4];
-       u16 v;
+       __le16 v;
        struct i2c_msg msg[2] = {
                {
                        .addr = s->config.demod_address,
@@ -249,12 +249,12 @@ static int _read16(struct drx397xD_state *s, u32 i2c_adr)
                }, {
                        .addr = s->config.demod_address,
                        .flags = I2C_M_RD,
-                       .buf = (u8 *) &v,
+                       .buf = (u8 *)&v,
                        .len = sizeof(v)
                }
        };
 
-       *(u32 *) a = i2c_adr;
+       *(__le32 *) a = i2c_adr;
 
        rc = i2c_transfer(s->i2c, msg, 2);
        if (rc != 2)
@@ -264,7 +264,7 @@ static int _read16(struct drx397xD_state *s, u32 i2c_adr)
 }
 
 /* Function is not endian safe, use the WR16.. wrappers below */
-static int _write16(struct drx397xD_state *s, u32 i2c_adr, u16 val)
+static int _write16(struct drx397xD_state *s, __le32 i2c_adr, __le16 val)
 {
        u8 a[6];
        int rc;
@@ -275,8 +275,8 @@ static int _write16(struct drx397xD_state *s, u32 i2c_adr, u16 val)
                .len = sizeof(a)
        };
 
-       *(u32 *) a = i2c_adr;
-       *(u16 *) &a[4] = val;
+       *(__le32 *)a = i2c_adr;
+       *(__le16 *)&a[4] = val;
 
        rc = i2c_transfer(s->i2c, &msg, 1);
        if (rc != 1)
index 2ad1ea0ccfb0f470b0dfa61380e29ca185546183..ba05d17290c633e51fdc30e0dc0055d9702affeb 100644 (file)
@@ -28,7 +28,7 @@
 #define DRX_F_OFFSET   36000000
 
 #define I2C_ADR_C0(x) \
-(      (u32)cpu_to_le32( \
+(      cpu_to_le32( \
                (u32)( \
                        (((u32)(x) & (u32)0x000000ffUL)      ) | \
                        (((u32)(x) & (u32)0x0000ff00UL) << 16) | \
@@ -38,7 +38,7 @@
 )
 
 #define I2C_ADR_E0(x) \
-(      (u32)cpu_to_le32( \
+(      cpu_to_le32( \
                (u32)( \
                        (((u32)(x) & (u32)0x000000ffUL)      ) | \
                        (((u32)(x) & (u32)0x0000ff00UL) << 16) | \