Rafael J. Wysocki schrieb: > I think we can introduce a "pm_safe" flag that will indicate if the driver > handles suspend/resume correctly. If we do it, we can flag all of the drivers > currently in the tree as "pm_safe" unless we know that they aren't. Next, > we can convert the core to fail the suspend for any driver that is not flagged > as "pm_safe". But I think that will take time. Why a new flag? IMHO it would be both more readable and more efficient to create a pm_generic_nosuspend() function which does "return -ENOSYS", and set that as the .suspend method on drivers known to break suspend/resume. New drivers should either have .suspend and .resume methods of their own or set .suspend = pm_generic_nosuspend. That way, NULL .suspend/.resume methods retain their current semantics ("don't know whether suspend would work, never thought about it"), error-returning ones would clearly signal "cannot suspend safely", and success-returning ones would equally clearly signal "suspend works ok". (Bugs nonwithstanding.) There could then be a policy parameter (Kconfig selectable to start) to abort suspend when encountering a driver without .suspend/.resume methods, or to proceed with a warning message. -- Tilman Schmidt E-Mail: tilman@imap.cc Bonn, Germany Diese Nachricht besteht zu 100% aus wiederverwerteten Bits. Ungeöffnet mindestens haltbar bis: (siehe Rückseite)