aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-12-11 06:11:21 -0500
committerJean Delvare <khali@linux-fr.org>2008-12-11 06:11:21 -0500
commit2b895c3f35d3ead0e9409b59da94094c7873f96d (patch)
tree7970c1bae45b434a93b4672c6fb0f1325212bbdf /drivers/i2c
parentd9d38ca07d5187b3082074934e73f014f5d31409 (diff)
i2c-highlander: Trivial endian casting fixes
Fixes sparse warnings: drivers/i2c/busses/i2c-highlander.c:95:26: warning: incorrect type in argument 1 (different base types) drivers/i2c/busses/i2c-highlander.c:95:26: expected restricted __be16 const [usertype] *p drivers/i2c/busses/i2c-highlander.c:95:26: got unsigned short [usertype] *<noident> drivers/i2c/busses/i2c-highlander.c:106:15: warning: incorrect type in assignment (different base types) drivers/i2c/busses/i2c-highlander.c:106:15: expected unsigned short [unsigned] [short] [usertype] <noident> drivers/i2c/busses/i2c-highlander.c:106:15: got restricted __be16 Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Ben Dooks <ben-linux@fluff.org> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-highlander.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-highlander.c b/drivers/i2c/busses/i2c-highlander.c
index f4d22ae9d294..e5a8dae4a289 100644
--- a/drivers/i2c/busses/i2c-highlander.c
+++ b/drivers/i2c/busses/i2c-highlander.c
@@ -92,7 +92,7 @@ static void highlander_i2c_setup(struct highlander_i2c_dev *dev)
92static void smbus_write_data(u8 *src, u16 *dst, int len) 92static void smbus_write_data(u8 *src, u16 *dst, int len)
93{ 93{
94 for (; len > 1; len -= 2) { 94 for (; len > 1; len -= 2) {
95 *dst++ = be16_to_cpup((u16 *)src); 95 *dst++ = be16_to_cpup((__be16 *)src);
96 src += 2; 96 src += 2;
97 } 97 }
98 98
@@ -103,7 +103,7 @@ static void smbus_write_data(u8 *src, u16 *dst, int len)
103static void smbus_read_data(u16 *src, u8 *dst, int len) 103static void smbus_read_data(u16 *src, u8 *dst, int len)
104{ 104{
105 for (; len > 1; len -= 2) { 105 for (; len > 1; len -= 2) {
106 *(u16 *)dst = cpu_to_be16p(src++); 106 *(__be16 *)dst = cpu_to_be16p(src++);
107 dst += 2; 107 dst += 2;
108 } 108 }
109 109