Google
  Web www.spinics.net

Re: Mapping a usbfs device to the corresponding sysfs device.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Sun, Jul 29, 2007 at 02:17:31AM -0400, Dave Mielke wrote:
> [quoted lines by Greg KH on 2007/07/28 at 23:04 -0700]
> 
> >It's easier to go from a sysfs device to a usbfs device, but I don't
> >understand the question really.  You want to know how to do it on newer
> >kernels but not older ones?  The mapping is still the same, nothing has
> >changed, you can still just look up the bus and device number from the
> >usbfs name and then walk sysfs to get the device.  That will work with
> >all kernel versions, right?
> 
> Yes, I suppose so, but we used to be able to go directly to it via 
> /sys/class/usb_device/usbdev<bus>.<dev>. Is there a reason that's gone 
> away (without special configuration)? Without it our code needs to become more
> complex, which is always something I'd rather avoid.

There is a kernel configuration option to retain this if you really need
it.  Right now the information is already availble in sysfs in a
different location (/sys/bus/usb/devices) so having this is redundant.

And yes, you can use /sys/bus/usb/devices on older kernels as well.

thanks,

greg k-h

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Linux-usb-users@xxxxxxxxxxxxxxxxxxxxx
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

[Linux USB]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Video Projectors]     [PDAs]     [Free Online Dating]     [Hacking TiVo]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Big List of Linux Books]     [16.7MP]

Powered by Linux