On Thu, 6 Oct 2011, Matthew Garrett wrote: > On Thu, Oct 06, 2011 at 01:13:26PM -0400, Alan Stern wrote: > > > No particular objections. Why do you store that characteristic > > explicitly in the device structure, as opposed to determining it > > whenever the sysfs file is read? The usb_set_device_visibility() > > routine could be renamed to usb_device_is_removable() and made public > > so that show_removable() can call it. > > The hub descriptor isn't the only data source. Making it dynamic would > involve adding extra callbacks to hook into the platform code, so > there's some extra complexity there without any terribly large benefit. Ah, I see. > We certainly could do it that way, but do you expect the data to change? No. That's why there didn't seem to be any need to store it -- the original value could be recreated on demand and would still be correct. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html