diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-08-20 19:44:50 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 07:36:51 -0400 |
commit | 95908ece60443ceb188fccf021d62823de8e6f0c (patch) | |
tree | ec98b196442fe21071213ae981747265371fdd9a /drivers | |
parent | 06a3f58496462f25cc031d1cb6d49cb78af1f636 (diff) |
V4L/DVB (8725): drx397xD.c sparse annotations
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/frontends/drx397xD.c | 14 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/drx397xD.h | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/dvb/frontends/drx397xD.c b/drivers/media/dvb/frontends/drx397xD.c index 77dd4f2c6260..0cf3af2f7da2 100644 --- a/drivers/media/dvb/frontends/drx397xD.c +++ b/drivers/media/dvb/frontends/drx397xD.c | |||
@@ -235,11 +235,11 @@ exit_rc: | |||
235 | } | 235 | } |
236 | 236 | ||
237 | /* Function is not endian safe, use the RD16 wrapper below */ | 237 | /* Function is not endian safe, use the RD16 wrapper below */ |
238 | static int _read16(struct drx397xD_state *s, u32 i2c_adr) | 238 | static int _read16(struct drx397xD_state *s, __le32 i2c_adr) |
239 | { | 239 | { |
240 | int rc; | 240 | int rc; |
241 | u8 a[4]; | 241 | u8 a[4]; |
242 | u16 v; | 242 | __le16 v; |
243 | struct i2c_msg msg[2] = { | 243 | struct i2c_msg msg[2] = { |
244 | { | 244 | { |
245 | .addr = s->config.demod_address, | 245 | .addr = s->config.demod_address, |
@@ -249,12 +249,12 @@ static int _read16(struct drx397xD_state *s, u32 i2c_adr) | |||
249 | }, { | 249 | }, { |
250 | .addr = s->config.demod_address, | 250 | .addr = s->config.demod_address, |
251 | .flags = I2C_M_RD, | 251 | .flags = I2C_M_RD, |
252 | .buf = (u8 *) &v, | 252 | .buf = (u8 *)&v, |
253 | .len = sizeof(v) | 253 | .len = sizeof(v) |
254 | } | 254 | } |
255 | }; | 255 | }; |
256 | 256 | ||
257 | *(u32 *) a = i2c_adr; | 257 | *(__le32 *) a = i2c_adr; |
258 | 258 | ||
259 | rc = i2c_transfer(s->i2c, msg, 2); | 259 | rc = i2c_transfer(s->i2c, msg, 2); |
260 | if (rc != 2) | 260 | if (rc != 2) |
@@ -264,7 +264,7 @@ static int _read16(struct drx397xD_state *s, u32 i2c_adr) | |||
264 | } | 264 | } |
265 | 265 | ||
266 | /* Function is not endian safe, use the WR16.. wrappers below */ | 266 | /* Function is not endian safe, use the WR16.. wrappers below */ |
267 | static int _write16(struct drx397xD_state *s, u32 i2c_adr, u16 val) | 267 | static int _write16(struct drx397xD_state *s, __le32 i2c_adr, __le16 val) |
268 | { | 268 | { |
269 | u8 a[6]; | 269 | u8 a[6]; |
270 | int rc; | 270 | int rc; |
@@ -275,8 +275,8 @@ static int _write16(struct drx397xD_state *s, u32 i2c_adr, u16 val) | |||
275 | .len = sizeof(a) | 275 | .len = sizeof(a) |
276 | }; | 276 | }; |
277 | 277 | ||
278 | *(u32 *) a = i2c_adr; | 278 | *(__le32 *)a = i2c_adr; |
279 | *(u16 *) &a[4] = val; | 279 | *(__le16 *)&a[4] = val; |
280 | 280 | ||
281 | rc = i2c_transfer(s->i2c, &msg, 1); | 281 | rc = i2c_transfer(s->i2c, &msg, 1); |
282 | if (rc != 1) | 282 | if (rc != 1) |
diff --git a/drivers/media/dvb/frontends/drx397xD.h b/drivers/media/dvb/frontends/drx397xD.h index 2ad1ea0ccfb0..ba05d17290c6 100644 --- a/drivers/media/dvb/frontends/drx397xD.h +++ b/drivers/media/dvb/frontends/drx397xD.h | |||
@@ -28,7 +28,7 @@ | |||
28 | #define DRX_F_OFFSET 36000000 | 28 | #define DRX_F_OFFSET 36000000 |
29 | 29 | ||
30 | #define I2C_ADR_C0(x) \ | 30 | #define I2C_ADR_C0(x) \ |
31 | ( (u32)cpu_to_le32( \ | 31 | ( cpu_to_le32( \ |
32 | (u32)( \ | 32 | (u32)( \ |
33 | (((u32)(x) & (u32)0x000000ffUL) ) | \ | 33 | (((u32)(x) & (u32)0x000000ffUL) ) | \ |
34 | (((u32)(x) & (u32)0x0000ff00UL) << 16) | \ | 34 | (((u32)(x) & (u32)0x0000ff00UL) << 16) | \ |
@@ -38,7 +38,7 @@ | |||
38 | ) | 38 | ) |
39 | 39 | ||
40 | #define I2C_ADR_E0(x) \ | 40 | #define I2C_ADR_E0(x) \ |
41 | ( (u32)cpu_to_le32( \ | 41 | ( cpu_to_le32( \ |
42 | (u32)( \ | 42 | (u32)( \ |
43 | (((u32)(x) & (u32)0x000000ffUL) ) | \ | 43 | (((u32)(x) & (u32)0x000000ffUL) ) | \ |
44 | (((u32)(x) & (u32)0x0000ff00UL) << 16) | \ | 44 | (((u32)(x) & (u32)0x0000ff00UL) << 16) | \ |