How do I find out which kernel module (as seen by typing lsmod) is servicing a particular device in /dev ?
In other words, say I have a device, /dev/mouse0 and I want to find out which kernel module is installed to service that device. How do I do that?
Another way to look at this is, some loaded kernel modules associate themselves with a device in /dev. How does one find out which device(s) a module is "attached" to?
Best Answer
You can usually find this information by digging through
/sys
if you're on a 2.6 kernel.e.g.
So the driver in this case is
usbhid
. There might be a better/neater way of doing this but I find digging in sysfs usually gets the job done.