From: Jaejoong Kim Date: Fri, 3 Mar 2017 08:54:00 +0000 (+0900) Subject: HID: cp2112: use proper hidraw name with minor number X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=42cb6b35b9e6b226c9b762627beec353642ff521;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Jaejoong Kim Signed-off-by: Jiri Kosina --- 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 #include #include +#include #include #include #include @@ -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);