On Mon, Aug 6, 2012 at 10:47 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > No, no, you have completely misunderstood the whole point of this > change. Sorry, you are right. And the callback should be renamed as '.runtime_post_resume', which should do something I/O related in theory just after device becomes active. > > The idea is for "func" to be called at a time when it is known that the > device is at full power. That means it _has_ to be called after the > runtime_resume callback returns. Yes, I agree, but I don't think it may make .runtime_post_resume not doable, do I? > > Also, "func" should not be stored in dev_pm_ops because it won't be a > read-only value. Sorry, could you explain it in detail that why the 'func' has to switch to multiple functions dynamically? I understand one function is enough and sometimes it can be bypassed with one flag(such as, ignore_post_resume is introduced in dev_pm_info) set. Also, the driver can store the device specific states in its own device instance to deal with different situations in the callback. If the idea is doable, we can save one pointer in 'struct device', since the 'func' may not be used by more than 90% devices, also have document benefit, even may simplify implementation of the mechanism. Thanks, -- Ming Lei -- 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