summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-cp2112.c
diff options
context:
space:
mode:
authorJaejoong Kim <climbbb.kim@gmail.com>2017-03-03 17:54:00 +0900
committerJiri Kosina <jkosina@suse.cz>2017-03-21 15:20:39 +0100
commit42cb6b35b9e6b226c9b762627beec353642ff521 (patch)
treed33df25c6d92647458fff8817a0b3c2c42f07165 /drivers/hid/hid-cp2112.c
parent9143059fafd4eebed2d43ffb5455178d4010e60a (diff)
downloadlinux-42cb6b35b9e6b226c9b762627beec353642ff521.tar.bz2
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>
Diffstat (limited to 'drivers/hid/hid-cp2112.c')
-rw-r--r--drivers/hid/hid-cp2112.c4
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 @@
#include <linux/gpio.h>
#include <linux/gpio/driver.h>
#include <linux/hid.h>
+#include <linux/hidraw.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/nls.h>
@@ -1297,7 +1298,8 @@ static int cp2112_probe(struct hid_device *hdev, const struct hid_device_id *id)
dev->adap.algo_data = dev;
dev->adap.dev.parent = &hdev->dev;
snprintf(dev->adap.name, sizeof(dev->adap.name),
- "CP2112 SMBus Bridge on hiddev%d", hdev->minor);
+ "CP2112 SMBus Bridge on hidraw%d",
+ ((struct hidraw *)hdev->hidraw)->minor);
dev->hwversion = buf[2];
init_waitqueue_head(&dev->wait);