On Thu, 21 Jun 2007, David Brownell wrote: > > If a driver wants to find out whether some resource will be available > > in the target system state, the only way is to ask the resource's > > provider. Hence the driver needs to have some cookie (representing the > > target state) that it can pass to the provider. > > Not true. The provider knows the target state. Just ask it whether > the resource will be available. It doesn't need a cookie to distinguish > between multiple target states, since there can be only one. _How_ does the provider know what the next target state is? Right now there's no way for that information to get from the PM core to the provider other than pm_message_t, and the pm_message_t will generally be passed to the provider _after_ it is passed to the lower-level drivers. There could be a global next_pm_system_state() routine. It would have to return _something_ -- and I think a cookie would be better than a struct. There are other possible ways to disseminate the information. The details don't matter much, and relatively few drivers would care. However the form of the information is a legitimate concern at this point. Alan Stern - To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html