> >> > >> Used devres API's to associate the phy with a device so that on > >> driver detach, release function is invoked on the devres data(usb_phy) > >> and devres data(usb_phy) is released. > > If the phy is got by two devices (like otg and device), will it cause > any > > problems? > > No. In that case the phy will be just associated with two devices > (because devm_usb_get_phy will be called twice) and on driver detach, > usb_put_phy will be called twice (corresponding to each driver that > called devm_usb_get_phy). Do you suspect of any problems? > So the devm_usb_phy_release will only be called when last phy user's detach? > Thanks > Kishon -- 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