public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* patch: acpi-20020821 fix?
@ 2002-08-27  6:55 Giridhar Pemmasani
       [not found] ` <15723.8797.507913.189282-KT8MnZFsUJrzAs+eN625g9BFLwJMpSEX@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Giridhar Pemmasani @ 2002-08-27  6:55 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

It seems that the following patch against drivers/acpi/system.c
is needed to get 'echo -n 5 > /proc/acpi/sleep' to work as
expected. 

--- system.c.orig   Tue Aug 27 02:42:17 2002
+++ system.c    Tue Aug 27 02:43:42 2002
@@ -110,7 +110,7 @@
    acpi_status status;
 
    /* only support S1 and S5 on kernel 2.4 */
-   if (state != ACPI_STATE_S1 || state != ACPI_STATE_S5)
+   if (state != ACPI_STATE_S1 && state != ACPI_STATE_S5)
        return AE_ERROR;
 
    acpi_enter_sleep_state_prep(state);


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390

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

* Re: patch: acpi-20020821 fix?
       [not found] ` <15723.8797.507913.189282-KT8MnZFsUJrzAs+eN625g9BFLwJMpSEX@public.gmane.org>
@ 2002-08-29 14:44   ` valvo
       [not found]     ` <20020829144434.GB246-eODHXEvUBeUUXDL+gvDWyA@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: valvo @ 2002-08-29 14:44 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

[-- Attachment #1: Type: text/plain, Size: 948 bytes --]

On Tue, Aug 27, 2002 at 02:55:25AM -0400, Giridhar Pemmasani wrote:

> It seems that the following patch against drivers/acpi/system.c
> is needed to get 'echo -n 5 > /proc/acpi/sleep' to work as
> expected. 
> 
> --- system.c.orig   Tue Aug 27 02:42:17 2002
> +++ system.c    Tue Aug 27 02:43:42 2002
> @@ -110,7 +110,7 @@
>     acpi_status status;
>  
>     /* only support S1 and S5 on kernel 2.4 */
> -   if (state != ACPI_STATE_S1 || state != ACPI_STATE_S5)
> +   if (state != ACPI_STATE_S1 && state != ACPI_STATE_S5)
>         return AE_ERROR;
>  
>     acpi_enter_sleep_state_prep(state);
> 

i don't understand the purpouses of this patch...can you be more explicit, plz ?

-- 
[ valvoline :: VRL Team :: s0ftpj :: freaknet Medialab :: GPG key available  ]
[ key fingerprint :: - :: B7E2 48BC 705F AE8F 9ABE  E422 076A 2561 1D67 B4DD ]
[ GPG key available on keyserver :: pgp.mit.edu :: with keyID :: 1D67B4DD :: ]

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: patch: acpi-20020821 fix?
       [not found]     ` <20020829144434.GB246-eODHXEvUBeUUXDL+gvDWyA@public.gmane.org>
@ 2002-08-29 15:13       ` Matthew Wilcox
  2002-08-29 15:20       ` Ville Syrjälä
  1 sibling, 0 replies; 5+ messages in thread
From: Matthew Wilcox @ 2002-08-29 15:13 UTC (permalink / raw)
  To: valvo, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Thu, Aug 29, 2002 at 04:44:34PM +0200, valvo wrote:
> On Tue, Aug 27, 2002 at 02:55:25AM -0400, Giridhar Pemmasani wrote:
> > -   if (state != ACPI_STATE_S1 || state != ACPI_STATE_S5)
> > +   if (state != ACPI_STATE_S1 && state != ACPI_STATE_S5)

> i don't understand the purpouses of this patch...can you be more explicit, plz ?

think about it... we have:

	if (x != a || z != b)

this is _always_ true.  if x == a then x != b and thus the test always passes
so we return an error.  it's a simple & easy mistake to make.

-- 
Revolutions do not require corporate support.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

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

* Re: patch: acpi-20020821 fix?
       [not found]     ` <20020829144434.GB246-eODHXEvUBeUUXDL+gvDWyA@public.gmane.org>
  2002-08-29 15:13       ` Matthew Wilcox
@ 2002-08-29 15:20       ` Ville Syrjälä
       [not found]         ` <20020829182033.A23001-ORSVBvAovxo@public.gmane.org>
  1 sibling, 1 reply; 5+ messages in thread
From: Ville Syrjälä @ 2002-08-29 15:20 UTC (permalink / raw)
  To: valvo, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Thu, Aug 29, 2002 at 04:44:34PM +0200, valvo wrote:
> On Tue, Aug 27, 2002 at 02:55:25AM -0400, Giridhar Pemmasani wrote:
> >     /* only support S1 and S5 on kernel 2.4 */
> > -   if (state != ACPI_STATE_S1 || state != ACPI_STATE_S5)
> > +   if (state != ACPI_STATE_S1 && state != ACPI_STATE_S5)
> >         return AE_ERROR;
>
> i don't understand the purpouses of this patch...can you be more explicit, plz ?

Looks clear to me. Without this change the condition is always true.

-- 
Ville Syrjälä
syrjala-ORSVBvAovxo@public.gmane.org
http://www.sci.fi/~syrjala/


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

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

* Re: patch: acpi-20020821 fix?
       [not found]         ` <20020829182033.A23001-ORSVBvAovxo@public.gmane.org>
@ 2002-08-29 20:47           ` valvo
  0 siblings, 0 replies; 5+ messages in thread
From: valvo @ 2002-08-29 20:47 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f; +Cc: valvo

[-- Attachment #1: Type: text/plain, Size: 442 bytes --]

On Thu, Aug 29, 2002 at 06:20:33PM +0300, Ville Syrj?l? wrote:

> Looks clear to me. Without this change the condition is always true.

sorry!. now it's clear! (=
btw, a common mistake....

-- 
[ valvoline :: VRL Team :: s0ftpj :: freaknet Medialab :: GPG key available  ]
[ key fingerprint :: - :: B7E2 48BC 705F AE8F 9ABE  E422 076A 2561 1D67 B4DD ]
[ GPG key available on keyserver :: pgp.mit.edu :: with keyID :: 1D67B4DD :: ]

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2002-08-29 20:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-27  6:55 patch: acpi-20020821 fix? Giridhar Pemmasani
     [not found] ` <15723.8797.507913.189282-KT8MnZFsUJrzAs+eN625g9BFLwJMpSEX@public.gmane.org>
2002-08-29 14:44   ` valvo
     [not found]     ` <20020829144434.GB246-eODHXEvUBeUUXDL+gvDWyA@public.gmane.org>
2002-08-29 15:13       ` Matthew Wilcox
2002-08-29 15:20       ` Ville Syrjälä
     [not found]         ` <20020829182033.A23001-ORSVBvAovxo@public.gmane.org>
2002-08-29 20:47           ` valvo

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