kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Get USB Device Class Type and Mount point
@ 2012-02-09  6:10 Abhijit Pawar
  2012-02-09  6:22 ` Abhijit Pawar
  2012-02-09 12:23 ` Greg KH
  0 siblings, 2 replies; 12+ messages in thread
From: Abhijit Pawar @ 2012-02-09  6:10 UTC (permalink / raw)
  To: kernelnewbies

Hi ,
Is there any way we can get the class type of the attached USB device
through struct usb_device in a kernel module?

I tried getting the device descriptor and interface descriptor and then use
them to get the Device and Interface Class and Subclass.

struct usb_device_descriptor *descriptor = &usbDev->descriptor;

struct usb_interface_descriptor *idesc = to_usb_interface(usbDev);

Whenever I run my kernel module, I get 0 for DeviceClass and Interface
Class. I checked the meaning and it says its the information and to be
gathered through interface.

Am I missing something here? What I want is to get the mount point / device
path of the USB devices. Like for Storage Device I would like to get its
mount path and for HID I would like to get its device path.

Regards,
Abhijit Pawar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120209/db9157b1/attachment.html 

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

end of thread, other threads:[~2012-02-14 11:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-09  6:10 Get USB Device Class Type and Mount point Abhijit Pawar
2012-02-09  6:22 ` Abhijit Pawar
2012-02-09 12:23 ` Greg KH
2012-02-09 13:48   ` Abhijit Pawar
2012-02-09 14:47     ` Greg KH
2012-02-10 13:49       ` Abhijit Pawar
2012-02-10 14:12         ` Greg KH
2012-02-13 12:14       ` Abhijit Pawar
2012-02-13 12:21         ` Mandeep Sandhu
2012-02-13 12:31           ` Abhijit Pawar
2012-02-13 15:02         ` Greg KH
2012-02-14 11:38           ` Abhijit Pawar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).