Skip to content

Commit

Permalink
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare…
Browse files Browse the repository at this point in the history
…-2.6

* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  i2c-highlander: Trivial endian casting fixes
  i2c-pmcmsp: Fix endianness misannotation
  • Loading branch information
Linus Torvalds committed Dec 13, 2008
2 parents 8d9c02e + 2b895c3 commit 68b32d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions drivers/i2c/busses/i2c-highlander.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static void highlander_i2c_setup(struct highlander_i2c_dev *dev)
static void smbus_write_data(u8 *src, u16 *dst, int len)
{
for (; len > 1; len -= 2) {
*dst++ = be16_to_cpup((u16 *)src);
*dst++ = be16_to_cpup((__be16 *)src);
src += 2;
}

Expand All @@ -103,7 +103,7 @@ static void smbus_write_data(u8 *src, u16 *dst, int len)
static void smbus_read_data(u16 *src, u8 *dst, int len)
{
for (; len > 1; len -= 2) {
*(u16 *)dst = cpu_to_be16p(src++);
*(__be16 *)dst = cpu_to_be16p(src++);
dst += 2;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-pmcmsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ static enum pmcmsptwi_xfer_result pmcmsptwi_xfer_cmd(

if (cmd->type == MSP_TWI_CMD_WRITE ||
cmd->type == MSP_TWI_CMD_WRITE_READ) {
__be64 tmp = cpu_to_be64p((u64 *)cmd->write_data);
u64 tmp = be64_to_cpup((__be64 *)cmd->write_data);
tmp >>= (MSP_MAX_BYTES_PER_RW - cmd->write_len) * 8;
dev_dbg(&pmcmsptwi_adapter.dev, "Writing 0x%016llx\n", tmp);
pmcmsptwi_writel(tmp & 0x00000000ffffffffLL,
Expand Down

0 comments on commit 68b32d4

Please sign in to comment.