diff options
author | Jaejoong Kim <climbbb.kim@gmail.com> | 2017-03-03 03:54:00 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2017-03-21 10:20:39 -0400 |
commit | 42cb6b35b9e6b226c9b762627beec353642ff521 (patch) | |
tree | d33df25c6d92647458fff8817a0b3c2c42f07165 | |
parent | 9143059fafd4eebed2d43ffb5455178d4010e60a (diff) |
HID: cp2112: use proper hidraw name with minor number
The cp2112 driver is working on hidraw not hiddev. So we need to use proper
hidraw name with hidraw's minor number.
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r-- | drivers/hid/hid-cp2112.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/hid/hid-cp2112.c b/drivers/hid/hid-cp2112.c index b22d0f83f8e3..078026f63b6f 100644 --- a/drivers/hid/hid-cp2112.c +++ b/drivers/hid/hid-cp2112.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/gpio.h> | 27 | #include <linux/gpio.h> |
28 | #include <linux/gpio/driver.h> | 28 | #include <linux/gpio/driver.h> |
29 | #include <linux/hid.h> | 29 | #include <linux/hid.h> |
30 | #include <linux/hidraw.h> | ||
30 | #include <linux/i2c.h> | 31 | #include <linux/i2c.h> |
31 | #include <linux/module.h> | 32 | #include <linux/module.h> |
32 | #include <linux/nls.h> | 33 | #include <linux/nls.h> |
@@ -1297,7 +1298,8 @@ static int cp2112_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
1297 | dev->adap.algo_data = dev; | 1298 | dev->adap.algo_data = dev; |
1298 | dev->adap.dev.parent = &hdev->dev; | 1299 | dev->adap.dev.parent = &hdev->dev; |
1299 | snprintf(dev->adap.name, sizeof(dev->adap.name), | 1300 | snprintf(dev->adap.name, sizeof(dev->adap.name), |
1300 | "CP2112 SMBus Bridge on hiddev%d", hdev->minor); | 1301 | "CP2112 SMBus Bridge on hidraw%d", |
1302 | ((struct hidraw *)hdev->hidraw)->minor); | ||
1301 | dev->hwversion = buf[2]; | 1303 | dev->hwversion = buf[2]; |
1302 | init_waitqueue_head(&dev->wait); | 1304 | init_waitqueue_head(&dev->wait); |
1303 | 1305 | ||