diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-12-30 13:16:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-12-30 13:16:51 -0500 |
commit | efdd17f89510531a6529e20048670bef9a073466 (patch) | |
tree | 1fbd09b589c4548a030e1319b6663f3970d02476 | |
parent | 3ce120b16cc548472f80cf8644f90eda958cf1b6 (diff) | |
parent | 7cb4774e2d3282d29edd00762167876a27cc7d2a (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID fixes from Jiri Kosina:
- two cosmetic fixes from Daniel Axtens and Hans de Goede
- fix for I2C command mismatch fix for cp2112 driver from Eudean Sun
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: core: lower log level for unknown main item tags to warnings
HID: holtekff: move MODULE_* parameters out of #ifdef block
HID: cp2112: Fix I2C_BLOCK_DATA transactions
-rw-r--r-- | drivers/hid/hid-core.c | 2 | ||||
-rw-r--r-- | drivers/hid/hid-cp2112.c | 15 | ||||
-rw-r--r-- | drivers/hid/hid-holtekff.c | 8 |
3 files changed, 18 insertions, 7 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index f3fcb836a1f9..0c3f608131cf 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -551,7 +551,7 @@ static int hid_parser_main(struct hid_parser *parser, struct hid_item *item) | |||
551 | ret = hid_add_field(parser, HID_FEATURE_REPORT, data); | 551 | ret = hid_add_field(parser, HID_FEATURE_REPORT, data); |
552 | break; | 552 | break; |
553 | default: | 553 | default: |
554 | hid_err(parser->device, "unknown main item tag 0x%x\n", item->tag); | 554 | hid_warn(parser->device, "unknown main item tag 0x%x\n", item->tag); |
555 | ret = 0; | 555 | ret = 0; |
556 | } | 556 | } |
557 | 557 | ||
diff --git a/drivers/hid/hid-cp2112.c b/drivers/hid/hid-cp2112.c index 68cdc962265b..271f31461da4 100644 --- a/drivers/hid/hid-cp2112.c +++ b/drivers/hid/hid-cp2112.c | |||
@@ -696,8 +696,16 @@ static int cp2112_xfer(struct i2c_adapter *adap, u16 addr, | |||
696 | (u8 *)&word, 2); | 696 | (u8 *)&word, 2); |
697 | break; | 697 | break; |
698 | case I2C_SMBUS_I2C_BLOCK_DATA: | 698 | case I2C_SMBUS_I2C_BLOCK_DATA: |
699 | size = I2C_SMBUS_BLOCK_DATA; | 699 | if (read_write == I2C_SMBUS_READ) { |
700 | /* fallthrough */ | 700 | read_length = data->block[0]; |
701 | count = cp2112_write_read_req(buf, addr, read_length, | ||
702 | command, NULL, 0); | ||
703 | } else { | ||
704 | count = cp2112_write_req(buf, addr, command, | ||
705 | data->block + 1, | ||
706 | data->block[0]); | ||
707 | } | ||
708 | break; | ||
701 | case I2C_SMBUS_BLOCK_DATA: | 709 | case I2C_SMBUS_BLOCK_DATA: |
702 | if (I2C_SMBUS_READ == read_write) { | 710 | if (I2C_SMBUS_READ == read_write) { |
703 | count = cp2112_write_read_req(buf, addr, | 711 | count = cp2112_write_read_req(buf, addr, |
@@ -785,6 +793,9 @@ static int cp2112_xfer(struct i2c_adapter *adap, u16 addr, | |||
785 | case I2C_SMBUS_WORD_DATA: | 793 | case I2C_SMBUS_WORD_DATA: |
786 | data->word = le16_to_cpup((__le16 *)buf); | 794 | data->word = le16_to_cpup((__le16 *)buf); |
787 | break; | 795 | break; |
796 | case I2C_SMBUS_I2C_BLOCK_DATA: | ||
797 | memcpy(data->block + 1, buf, read_length); | ||
798 | break; | ||
788 | case I2C_SMBUS_BLOCK_DATA: | 799 | case I2C_SMBUS_BLOCK_DATA: |
789 | if (read_length > I2C_SMBUS_BLOCK_MAX) { | 800 | if (read_length > I2C_SMBUS_BLOCK_MAX) { |
790 | ret = -EPROTO; | 801 | ret = -EPROTO; |
diff --git a/drivers/hid/hid-holtekff.c b/drivers/hid/hid-holtekff.c index 9325545fc3ae..edc0f64bb584 100644 --- a/drivers/hid/hid-holtekff.c +++ b/drivers/hid/hid-holtekff.c | |||
@@ -32,10 +32,6 @@ | |||
32 | 32 | ||
33 | #ifdef CONFIG_HOLTEK_FF | 33 | #ifdef CONFIG_HOLTEK_FF |
34 | 34 | ||
35 | MODULE_LICENSE("GPL"); | ||
36 | MODULE_AUTHOR("Anssi Hannula <anssi.hannula@iki.fi>"); | ||
37 | MODULE_DESCRIPTION("Force feedback support for Holtek On Line Grip based devices"); | ||
38 | |||
39 | /* | 35 | /* |
40 | * These commands and parameters are currently known: | 36 | * These commands and parameters are currently known: |
41 | * | 37 | * |
@@ -223,3 +219,7 @@ static struct hid_driver holtek_driver = { | |||
223 | .probe = holtek_probe, | 219 | .probe = holtek_probe, |
224 | }; | 220 | }; |
225 | module_hid_driver(holtek_driver); | 221 | module_hid_driver(holtek_driver); |
222 | |||
223 | MODULE_LICENSE("GPL"); | ||
224 | MODULE_AUTHOR("Anssi Hannula <anssi.hannula@iki.fi>"); | ||
225 | MODULE_DESCRIPTION("Force feedback support for Holtek On Line Grip based devices"); | ||