Skip to contentSkip to conversation

HID: hiddev: allocate minor number hiddev's USB interface is bound to

PATCH Superseded Jaejoong Kim 1 participant 1 message Feb 10, 2017

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID: hiddev: allocate minor number hiddev's USB interface is bound to

When HID device connect to the PC, HID devic 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 another one.

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

---
 drivers/hid/usbhid/hiddev.c | 1 +
 1 file changed, 1 insertion(+)
drivers/hid/usbhid/hiddev.c +1 -0
index 700145b..27e1f8d 100644
@@ -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;
 }
 
Signature · 6 lines
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html