The patch titled power management: remove some useless code from arm platforms has been added to the -mm tree. Its filename is power-management-remove-some-useless-code-from-arm.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: power management: remove some useless code from arm platforms From: Johannes Berg <johannes@xxxxxxxxxxxxxxxx> This patch kills some useless code omap1/omap2. Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx> Cc: Greg KH <greg@xxxxxxxxx> Cc: Tony Lindgren <tony@xxxxxxxxxxx> Cc: Russell King <rmk@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/arm/mach-omap1/pm.c | 36 +++++------------------------------ arch/arm/mach-omap2/pm.c | 38 +++++-------------------------------- 2 files changed, 12 insertions(+), 62 deletions(-) diff -puN arch/arm/mach-omap1/pm.c~power-management-remove-some-useless-code-from-arm arch/arm/mach-omap1/pm.c --- a/arch/arm/mach-omap1/pm.c~power-management-remove-some-useless-code-from-arm +++ a/arch/arm/mach-omap1/pm.c @@ -620,26 +620,11 @@ static void (*saved_idle)(void) = NULL; */ static int omap_pm_prepare(suspend_state_t state) { - int error = 0; - /* We cannot sleep in idle until we have resumed */ saved_idle = pm_idle; pm_idle = NULL; - switch (state) - { - case PM_SUSPEND_STANDBY: - case PM_SUSPEND_MEM: - break; - - case PM_SUSPEND_DISK: - return -ENOTSUPP; - - default: - return -EINVAL; - } - - return error; + return 0; } @@ -651,20 +636,11 @@ static int omap_pm_prepare(suspend_state static int omap_pm_enter(suspend_state_t state) { - switch (state) - { - case PM_SUSPEND_STANDBY: - case PM_SUSPEND_MEM: - omap_pm_suspend(); - break; - - case PM_SUSPEND_DISK: - return -ENOTSUPP; - - default: - return -EINVAL; - } - + /* + * since we mark only "mem" as valid + * there's no need to check "state" here + */ + omap_pm_suspend(); return 0; } diff -puN arch/arm/mach-omap2/pm.c~power-management-remove-some-useless-code-from-arm arch/arm/mach-omap2/pm.c --- a/arch/arm/mach-omap2/pm.c~power-management-remove-some-useless-code-from-arm +++ a/arch/arm/mach-omap2/pm.c @@ -73,26 +73,11 @@ void omap2_pm_idle(void) static int omap2_pm_prepare(suspend_state_t state) { - int error = 0; - /* We cannot sleep in idle until we have resumed */ saved_idle = pm_idle; pm_idle = NULL; - switch (state) - { - case PM_SUSPEND_STANDBY: - case PM_SUSPEND_MEM: - break; - - case PM_SUSPEND_DISK: - return -ENOTSUPP; - - default: - return -EINVAL; - } - - return error; + return 0; } #define INT0_WAKE_MASK (OMAP_IRQ_BIT(INT_24XX_GPIO_BANK1) | \ @@ -345,22 +330,11 @@ static int omap2_pm_suspend(void) static int omap2_pm_enter(suspend_state_t state) { - int ret = 0; - - switch (state) - { - case PM_SUSPEND_STANDBY: - case PM_SUSPEND_MEM: - ret = omap2_pm_suspend(); - break; - case PM_SUSPEND_DISK: - ret = -ENOTSUPP; - break; - default: - ret = -EINVAL; - } - - return ret; + /* + * since we mark only 'mem' as valid, there's + * no need to check 'state' here + */ + return omap2_pm_suspend(); } static int omap2_pm_finish(suspend_state_t state) _ Patches currently in -mm which might be from johannes@xxxxxxxxxxxxxxxx are rework-pm_ops-pm_disk_mode-kill-misuse.patch power-management-remove-firmware-disk-mode.patch power-management-implement-pm_opsvalid-for-everybody.patch power-management-implement-pm_opsvalid-for-everybody-fix.patch power-management-force-pm_opsvalid-callback-to-be.patch git-alsa.patch git-powerpc.patch git-powerpc-arch-powerpc-sysdev-timerc-build-fix.patch s2ram-add-arch-irq-disable-enable-hooks.patch power-management-remove-some-useless-code-from-arm.patch git-netdev-all-export-ieee80211_debug_level.patch git-net.patch remove-software_suspend.patch power-management-change-sys-power-disk-display.patch fix-sscanf-%n-match-at-end-of-input-string.patch fix-sscanf-%n-match-at-end-of-input-string-tidy.patch kernel-doc-html-mode-struct-highlights.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html