diff options
-rw-r--r-- | drivers/hid/hid-cp2112.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/hid/hid-cp2112.c b/drivers/hid/hid-cp2112.c index a84d3700e740..7afc3fcc122c 100644 --- a/drivers/hid/hid-cp2112.c +++ b/drivers/hid/hid-cp2112.c | |||
@@ -589,7 +589,7 @@ static int cp2112_xfer(struct i2c_adapter *adap, u16 addr, | |||
589 | struct cp2112_device *dev = (struct cp2112_device *)adap->algo_data; | 589 | struct cp2112_device *dev = (struct cp2112_device *)adap->algo_data; |
590 | struct hid_device *hdev = dev->hdev; | 590 | struct hid_device *hdev = dev->hdev; |
591 | u8 buf[64]; | 591 | u8 buf[64]; |
592 | __be16 word; | 592 | __le16 word; |
593 | ssize_t count; | 593 | ssize_t count; |
594 | size_t read_length = 0; | 594 | size_t read_length = 0; |
595 | unsigned int retries; | 595 | unsigned int retries; |
@@ -621,7 +621,7 @@ static int cp2112_xfer(struct i2c_adapter *adap, u16 addr, | |||
621 | break; | 621 | break; |
622 | case I2C_SMBUS_WORD_DATA: | 622 | case I2C_SMBUS_WORD_DATA: |
623 | read_length = 2; | 623 | read_length = 2; |
624 | word = cpu_to_be16(data->word); | 624 | word = cpu_to_le16(data->word); |
625 | 625 | ||
626 | if (I2C_SMBUS_READ == read_write) | 626 | if (I2C_SMBUS_READ == read_write) |
627 | count = cp2112_write_read_req(buf, addr, read_length, | 627 | count = cp2112_write_read_req(buf, addr, read_length, |
@@ -634,7 +634,7 @@ static int cp2112_xfer(struct i2c_adapter *adap, u16 addr, | |||
634 | size = I2C_SMBUS_WORD_DATA; | 634 | size = I2C_SMBUS_WORD_DATA; |
635 | read_write = I2C_SMBUS_READ; | 635 | read_write = I2C_SMBUS_READ; |
636 | read_length = 2; | 636 | read_length = 2; |
637 | word = cpu_to_be16(data->word); | 637 | word = cpu_to_le16(data->word); |
638 | 638 | ||
639 | count = cp2112_write_read_req(buf, addr, read_length, command, | 639 | count = cp2112_write_read_req(buf, addr, read_length, command, |
640 | (u8 *)&word, 2); | 640 | (u8 *)&word, 2); |
@@ -727,7 +727,7 @@ static int cp2112_xfer(struct i2c_adapter *adap, u16 addr, | |||
727 | data->byte = buf[0]; | 727 | data->byte = buf[0]; |
728 | break; | 728 | break; |
729 | case I2C_SMBUS_WORD_DATA: | 729 | case I2C_SMBUS_WORD_DATA: |
730 | data->word = be16_to_cpup((__be16 *)buf); | 730 | data->word = le16_to_cpup((__le16 *)buf); |
731 | break; | 731 | break; |
732 | case I2C_SMBUS_BLOCK_DATA: | 732 | case I2C_SMBUS_BLOCK_DATA: |
733 | if (read_length > I2C_SMBUS_BLOCK_MAX) { | 733 | if (read_length > I2C_SMBUS_BLOCK_MAX) { |