On Sun, Feb 14, 2010 at 08:05:00AM +0530, Anoop wrote: > Hi Greg, > > Thanks for reply. > > On Sat, Feb 13, 2010 at 10:02 PM, Greg KH <greg@xxxxxxxxx> wrote: > > On Wed, Feb 10, 2010 at 09:46:42PM +0530, Anoop wrote: > >> Hi List, > >> > >> My system has two USB ports. And I want to know, what is the way to > >> find, to which USB port the device is plugged in. Moreover what type > >> of device is it. Can I figure this out from kspace? > > > > You want to determine this from another kernel module? ?What is the > > problem you are trying to solve here? > My target has two USB ports. I want to write a user space application > through which I want to provide a interface to user, from where he can > mount/unmount the device. Also depending upon the device plugged in, I > want to provide services to the user. Then you do not need to detect this from within the kernel as you originally asked, just use udev to notify you of changes here. Just like HAL does this already today. hope this helps, greg k-h -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ