Hi! > This patch adds a new state PM_SUSPEND_FIRMWAREDISK state and cleans up > all pm_ops users to include a .valid callback which in most cases allows > only mem suspend since except ACPI they all don't differentiate between > standby/mem which are currently allowed. > This new state has no users yet but I think APM could be converted The person doing the conversion should add the state, sorry... ... actually it makes sense, but I'd prefer not to have it, yet. > --- linux-2.6.orig/arch/arm/common/sharpsl_pm.c 2007-03-20 10:51:02.053214909 +0100 > +++ linux-2.6/arch/arm/common/sharpsl_pm.c 2007-03-20 10:51:58.963214909 +0100 > @@ -765,10 +765,16 @@ static void sharpsl_apm_get_power_status > info->battery_life = sharpsl_pm.battstat.mainbat_percent; > } > > +static int pxa_pm_valid(suspend_state_t state) > +{ > + return state == PM_SUSPEND_MEM; > +} create static inline pm_valid_only_mem() somewhere in header, then share it around the code? > --- linux-2.6.orig/kernel/power/main.c 2007-03-20 11:13:31.173214909 +0100 > +++ linux-2.6/kernel/power/main.c 2007-03-20 11:15:30.153214909 +0100 > @@ -157,11 +157,14 @@ static void suspend_finish(suspend_state > > > static const char * const pm_states[PM_SUSPEND_MAX] = { > - [PM_SUSPEND_STANDBY] = "standby", > - [PM_SUSPEND_MEM] = "mem", > + "standby", > + "mem", > #ifdef CONFIG_SOFTWARE_SUSPEND > - [PM_SUSPEND_DISK] = "disk", > + "disk", > +#else > + NULL, > #endif > + "firmware-disk", > }; I'd keep the c99 syntax here. (And we do not need firmware-disk just yet). Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm