oops. I tried getting interface descriptor from usb interface which is wrong. However still I am not able to get the class type from device descriptor.<div><br></div><div>Regards,</div><div>Abhijit Pawar</div><div><br><br>
<div class="gmail_quote">On 9 February 2012 11:40, Abhijit Pawar <span dir="ltr">&lt;<a href="mailto:apawar.linux@gmail.com">apawar.linux@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi ,<br>
Is there any way we can get the class type of the attached USB device through struct usb_device in a kernel module?<br>
<br>
I tried getting the device descriptor and interface descriptor and then 
use them to get the Device and Interface Class and Subclass.<br>
<br>
struct usb_device_descriptor *descriptor = &amp;usbDev-&gt;descriptor;<br>
 <br>
struct usb_interface_descriptor *idesc = to_usb_interface(usbDev);<br>
<br>
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.<br>
<br>
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.<br>
<br>
Regards,<span class="HOEnZb"><font color="#888888"><br>
Abhijit Pawar
</font></span></blockquote></div><br></div>