Commit efdd17f8 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 3ce120b1 7cb4774e
...@@ -551,7 +551,7 @@ static int hid_parser_main(struct hid_parser *parser, struct hid_item *item) ...@@ -551,7 +551,7 @@ static int hid_parser_main(struct hid_parser *parser, struct hid_item *item)
ret = hid_add_field(parser, HID_FEATURE_REPORT, data); ret = hid_add_field(parser, HID_FEATURE_REPORT, data);
break; break;
default: default:
hid_err(parser->device, "unknown main item tag 0x%x\n", item->tag); hid_warn(parser->device, "unknown main item tag 0x%x\n", item->tag);
ret = 0; ret = 0;
} }
......
...@@ -696,8 +696,16 @@ static int cp2112_xfer(struct i2c_adapter *adap, u16 addr, ...@@ -696,8 +696,16 @@ static int cp2112_xfer(struct i2c_adapter *adap, u16 addr,
(u8 *)&word, 2); (u8 *)&word, 2);
break; break;
case I2C_SMBUS_I2C_BLOCK_DATA: case I2C_SMBUS_I2C_BLOCK_DATA:
size = I2C_SMBUS_BLOCK_DATA; if (read_write == I2C_SMBUS_READ) {
/* fallthrough */ read_length = data->block[0];
count = cp2112_write_read_req(buf, addr, read_length,
command, NULL, 0);
} else {
count = cp2112_write_req(buf, addr, command,
data->block + 1,
data->block[0]);
}
break;
case I2C_SMBUS_BLOCK_DATA: case I2C_SMBUS_BLOCK_DATA:
if (I2C_SMBUS_READ == read_write) { if (I2C_SMBUS_READ == read_write) {
count = cp2112_write_read_req(buf, addr, count = cp2112_write_read_req(buf, addr,
...@@ -785,6 +793,9 @@ static int cp2112_xfer(struct i2c_adapter *adap, u16 addr, ...@@ -785,6 +793,9 @@ static int cp2112_xfer(struct i2c_adapter *adap, u16 addr,
case I2C_SMBUS_WORD_DATA: case I2C_SMBUS_WORD_DATA:
data->word = le16_to_cpup((__le16 *)buf); data->word = le16_to_cpup((__le16 *)buf);
break; break;
case I2C_SMBUS_I2C_BLOCK_DATA:
memcpy(data->block + 1, buf, read_length);
break;
case I2C_SMBUS_BLOCK_DATA: case I2C_SMBUS_BLOCK_DATA:
if (read_length > I2C_SMBUS_BLOCK_MAX) { if (read_length > I2C_SMBUS_BLOCK_MAX) {
ret = -EPROTO; ret = -EPROTO;
......
...@@ -32,10 +32,6 @@ ...@@ -32,10 +32,6 @@
#ifdef CONFIG_HOLTEK_FF #ifdef CONFIG_HOLTEK_FF
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Anssi Hannula <anssi.hannula@iki.fi>");
MODULE_DESCRIPTION("Force feedback support for Holtek On Line Grip based devices");
/* /*
* These commands and parameters are currently known: * These commands and parameters are currently known:
* *
...@@ -223,3 +219,7 @@ static struct hid_driver holtek_driver = { ...@@ -223,3 +219,7 @@ static struct hid_driver holtek_driver = {
.probe = holtek_probe, .probe = holtek_probe,
}; };
module_hid_driver(holtek_driver); module_hid_driver(holtek_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Anssi Hannula <anssi.hannula@iki.fi>");
MODULE_DESCRIPTION("Force feedback support for Holtek On Line Grip based devices");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment