Hi! > >2) Having "ports" subdir with RW files, one per each existing physical port > >In this situation we don't need "new_port" or "remove_port". If we > >want port to be observable we just do: > >echo 1 > 1-1 > >Implementing this solution needs reading more details from USB subsystem. > > The situation here is clear IMO - the number of USB ports in the system > can change dynamically. I'm not sure if this can be handled easily with > sysfs, where we usually expose an interface for known set of settings. > struct attribute arrays are usually defined statically at the compile > time and filled with the variables, that are created with DEVICE_ATTR > macro. sysfs already exposes current view of all usb devices. Just use it. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html