public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Remove #ifdef CONFIG_PM from ACPI power-off code
@ 2007-07-12 14:58 Eduardo Habkost
  2007-07-13  3:19 ` Len Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Eduardo Habkost @ 2007-07-12 14:58 UTC (permalink / raw)
  To: Len Brown; +Cc: linux-acpi

The ACPI poweroff code is inside a #ifdef CONFIG_PM, that was added on
commit b35c67a46b025e8dc320b59fbe5c283094e1d7f5. The #ifdef is not
necessary because the poweroff code compiles and works even if
CONFIG_PM is disabled. This patch removes the #ifdef around the code.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 drivers/acpi/sleep/poweroff.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/acpi/sleep/poweroff.c b/drivers/acpi/sleep/poweroff.c
index d9801ef..5d6ba10 100644
--- a/drivers/acpi/sleep/poweroff.c
+++ b/drivers/acpi/sleep/poweroff.c
@@ -37,8 +37,6 @@ #endif
 	return 0;
 }
 
-#ifdef CONFIG_PM
-
 void acpi_power_off(void)
 {
 	/* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */
@@ -94,5 +92,3 @@ static int acpi_poweroff_init(void)
 }
 
 late_initcall(acpi_poweroff_init);
-
-#endif				/* CONFIG_PM */

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Remove #ifdef CONFIG_PM from ACPI power-off code
  2007-07-12 14:58 [PATCH] Remove #ifdef CONFIG_PM from ACPI power-off code Eduardo Habkost
@ 2007-07-13  3:19 ` Len Brown
  2007-07-13 12:55   ` Eduardo Pereira Habkost
  0 siblings, 1 reply; 3+ messages in thread
From: Len Brown @ 2007-07-13  3:19 UTC (permalink / raw)
  To: Eduardo Habkost; +Cc: Len Brown, linux-acpi

On Thursday 12 July 2007 10:58, Eduardo Habkost wrote:
> The ACPI poweroff code is inside a #ifdef CONFIG_PM, that was added on
> commit b35c67a46b025e8dc320b59fbe5c283094e1d7f5. The #ifdef is not
> necessary because the poweroff code compiles and works even if
> CONFIG_PM is disabled. This patch removes the #ifdef around the code.

the patch is correct, but the comment is not,
as it should not be possible to build CONFIG_ACPI w/o CONFIG_PM,

-Len

> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
>  drivers/acpi/sleep/poweroff.c |    4 ----
>  1 files changed, 0 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/acpi/sleep/poweroff.c b/drivers/acpi/sleep/poweroff.c
> index d9801ef..5d6ba10 100644
> --- a/drivers/acpi/sleep/poweroff.c
> +++ b/drivers/acpi/sleep/poweroff.c
> @@ -37,8 +37,6 @@ #endif
>  	return 0;
>  }
>  
> -#ifdef CONFIG_PM
> -
>  void acpi_power_off(void)
>  {
>  	/* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */
> @@ -94,5 +92,3 @@ static int acpi_poweroff_init(void)
>  }
>  
>  late_initcall(acpi_poweroff_init);
> -
> -#endif				/* CONFIG_PM */
> -
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Remove #ifdef CONFIG_PM from ACPI power-off code
  2007-07-13  3:19 ` Len Brown
@ 2007-07-13 12:55   ` Eduardo Pereira Habkost
  0 siblings, 0 replies; 3+ messages in thread
From: Eduardo Pereira Habkost @ 2007-07-13 12:55 UTC (permalink / raw)
  To: Len Brown; +Cc: Len Brown, linux-acpi

On Thu, Jul 12, 2007 at 11:19:16PM -0400, Len Brown wrote:
> On Thursday 12 July 2007 10:58, Eduardo Habkost wrote:
> > The ACPI poweroff code is inside a #ifdef CONFIG_PM, that was added on
> > commit b35c67a46b025e8dc320b59fbe5c283094e1d7f5. The #ifdef is not
> > necessary because the poweroff code compiles and works even if
> > CONFIG_PM is disabled. This patch removes the #ifdef around the code.
> 
> the patch is correct, but the comment is not,
> as it should not be possible to build CONFIG_ACPI w/o CONFIG_PM,

I have a patched tree (test tree the xen patches) where CONFIG_ACPI
builds without CONFIG_PM. But I have sent this upstream anyway because
not being able to compile CONFIG_ACPI without CONFIG_PM is another reason
to not have the #ifdef.

I could be more clear on the comment. I didn't mean that CONFIG_ACPI
works without CONFIG_PM out of the box, but that specifically the poweroff
code would compile and work even without CONFIG_PM (but, yes, only if
compiling ACPI without CONFIG_PM was possible, like in the tree I am
working on).

Should I correct the comment and resend?

> 
> -Len
> 
> > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> > ---
> >  drivers/acpi/sleep/poweroff.c |    4 ----
> >  1 files changed, 0 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/acpi/sleep/poweroff.c b/drivers/acpi/sleep/poweroff.c
> > index d9801ef..5d6ba10 100644
> > --- a/drivers/acpi/sleep/poweroff.c
> > +++ b/drivers/acpi/sleep/poweroff.c
> > @@ -37,8 +37,6 @@ #endif
> >  	return 0;
> >  }
> >  
> > -#ifdef CONFIG_PM
> > -
> >  void acpi_power_off(void)
> >  {
> >  	/* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */
> > @@ -94,5 +92,3 @@ static int acpi_poweroff_init(void)
> >  }
> >  
> >  late_initcall(acpi_poweroff_init);
> > -
> > -#endif				/* CONFIG_PM */

-- 
Eduardo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-07-13 12:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-12 14:58 [PATCH] Remove #ifdef CONFIG_PM from ACPI power-off code Eduardo Habkost
2007-07-13  3:19 ` Len Brown
2007-07-13 12:55   ` Eduardo Pereira Habkost

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox