Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1591772
| From | Jaejoong Kim <climbbb.kim@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 1/2] HID: cp2112: use proper hidraw name with minor number |
| Date | 2017-03-03 10:10 +0100 |
| Message-ID | <tgRnR-7or-53@gated-at.bofh.it> (permalink) |
| References | <tgRnR-7or-55@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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> --- Changes in v2: - tie in a series --- drivers/hid/hid-cp2112.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/hid/hid-cp2112.c b/drivers/hid/hid-cp2112.c index b22d0f8..078026f 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); -- 2.7.4
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH v2 1/2] HID: cp2112: use proper hidraw name with minor number Jaejoong Kim <climbbb.kim@gmail.com> - 2017-03-03 10:10 +0100
csiph-web