From: Dmitry Krivoschekov <dmitry.krivoschekov@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-omap-open-source@linux.omap.com,
linux-pm <linux-pm@lists.linux-foundation.org>
Subject: Re: [PATCH] power management: remove some useless code from arm platforms
Date: Fri, 27 Apr 2007 01:12:26 +0400 [thread overview]
Message-ID: <463115BA.70505@gmail.com> (raw)
In-Reply-To: <1177604177.6814.81.camel@johannes.berg>
Johannes Berg wrote:
> This patch kills some useless code omap1/omap2.
Although the change looks harmless it'd be nice CC-ing
appropriate "arch" or "mach" lists.
Added omap list to CC.
BTW, you change OMAP stuff only, so your subject is slightly irrelevant.
Regards,
Dmitry
>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
>
> ---
> arch/arm/mach-omap1/pm.c | 36 ++++++------------------------------
> arch/arm/mach-omap2/pm.c | 38 ++++++--------------------------------
> 2 files changed, 12 insertions(+), 62 deletions(-)
>
> --- wireless-dev.orig/arch/arm/mach-omap1/pm.c 2007-04-26 17:23:20.263249310 +0200
> +++ wireless-dev/arch/arm/mach-omap1/pm.c 2007-04-26 17:28:00.003249310 +0200
> @@ -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;
> }
>
> --- wireless-dev.orig/arch/arm/mach-omap2/pm.c 2007-04-26 17:23:20.403249310 +0200
> +++ wireless-dev/arch/arm/mach-omap2/pm.c 2007-04-26 17:28:20.323249310 +0200
> @@ -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)
>
>
> _______________________________________________
> linux-pm mailing list
> linux-pm@lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/linux-pm
>
next prev parent reply other threads:[~2007-04-26 21:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-26 16:16 [PATCH] power management: remove some useless code from arm platforms Johannes Berg
2007-04-26 21:12 ` Dmitry Krivoschekov [this message]
2007-04-27 9:38 ` Johannes Berg
2007-04-28 0:53 ` Andrew Morton
2007-04-28 3:41 ` Tony Lindgren
2007-05-02 3:48 ` Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=463115BA.70505@gmail.com \
--to=dmitry.krivoschekov@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=johannes@sipsolutions.net \
--cc=linux-omap-open-source@linux.omap.com \
--cc=linux-pm@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox