Skip to content
  • Thomas Abraham's avatar
    usb : usb_kbd : Populating 'priv' member of USB keyboard device_t structure · 1eb734fe
    Thomas Abraham authored
    
    
    This patch populates the 'priv' field of the USB keyboard device_t
    structure. The 'priv' field is populated with the address of the
    'struct usb_device' structure that represents the USB device.
    
    The 'priv' field can then be used in the 'usb_event_poll' function to
    determine the USB device that requires to be polled. An
    example of its usage in 'usb_event_poll' function is as below.
    
    	device_t *dev;
    	struct usb_device *usb_kbd_dev;
    
    	<snip>
    
    	dev = device_get_by_name("usbkbd");
    	usb_kbd_dev = (struct usb_device *)dev->priv;
    	iface = &usb_kbd_dev->config.if_desc[0];
    
    Signed-off-by: default avatarThomas Abraham <t-abraham@ti.com>
    Signed-off-by: default avatarRemy Bohmer <linux@bohmer.net>
    1eb734fe