All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] HID: hiddev: allocate minor number hiddev's USB interface is bound to
@ 2017-02-15  9:55 Jaejoong Kim
       [not found] ` <1487152516-12335-1-git-send-email-climbbb.kim-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Jaejoong Kim @ 2017-02-15  9:55 UTC (permalink / raw)
  To: jikos-DgEjT+Ai2ygdnm+yROfE0A, benjamin.tissoires-H+wXaHxf7aLQT0dZR+AlfA
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-input-u79uwXL29TY76Z2rM5mHXA, Jaejoong Kim

When HID device connected to the PC, HID device driver announces which
driver is loaded with a kernel info message. In this case, hiddev's minor
number is always '0' even though hiddev's real minor number is not zero.

To display hiddev with minor number asked from usb core, we need
to fill hiddev's minor number this interface is bound to.

Signed-off-by: Jaejoong Kim <climbbb.kim-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
Changes in v2:
 - fix typo in commit message
---

 drivers/hid/usbhid/hiddev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c
index 700145b..27e1f8d 100644
--- a/drivers/hid/usbhid/hiddev.c
+++ b/drivers/hid/usbhid/hiddev.c
@@ -910,6 +910,7 @@ int hiddev_connect(struct hid_device *hid, unsigned int force)
 		kfree(hiddev);
 		return -1;
 	}
+	hid->minor = usbhid->intf->minor;
 	return 0;
 }
 
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-02  5:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-15  9:55 [PATCH v2] HID: hiddev: allocate minor number hiddev's USB interface is bound to Jaejoong Kim
     [not found] ` <1487152516-12335-1-git-send-email-climbbb.kim-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-02-28  7:55   ` Kim Jaejoong
2017-02-28 17:05   ` Benjamin Tissoires
     [not found]     ` <20170228170507.GA7064-/m+UfqrgI5QNLKR9yMNcA1aTQe2KTcn/@public.gmane.org>
2017-03-02  5:01       ` Kim Jaejoong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.