summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends/drx397xD.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-08-20 16:44:50 -0700
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-08-20 16:44:50 -0700
commit5c9ae10b02888a111c93293606406542f9fa8d8a (patch)
tree1443846970af656d94afadd5a9379157d4b05625 /linux/drivers/media/dvb/frontends/drx397xD.c
parent0fab8808e0c1e7746e9f4a87b0eea1c45a6a47a5 (diff)
downloadmediapointer-dvb-s2-5c9ae10b02888a111c93293606406542f9fa8d8a.tar.gz
mediapointer-dvb-s2-5c9ae10b02888a111c93293606406542f9fa8d8a.tar.bz2
drx397xD.c sparse annotations
From: Harvey Harrison <harvey.harrison@gmail.com> 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@infradead.org>
Diffstat (limited to 'linux/drivers/media/dvb/frontends/drx397xD.c')
-rw-r--r--linux/drivers/media/dvb/frontends/drx397xD.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/linux/drivers/media/dvb/frontends/drx397xD.c b/linux/drivers/media/dvb/frontends/drx397xD.c
index 2ff10e29e..3f9f19c70 100644
--- a/linux/drivers/media/dvb/frontends/drx397xD.c
+++ b/linux/drivers/media/dvb/frontends/drx397xD.c
@@ -236,11 +236,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,
@@ -250,12 +250,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)
@@ -265,7 +265,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;
@@ -276,8 +276,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)