LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] [drivers/misc/asus-laptop.c] add parentheses
@ 2008-02-02 20:07 Roel Kluin
  2008-02-07  5:42 ` Len Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2008-02-02 20:07 UTC (permalink / raw)
  To: corentincj, acpi4asus-user; +Cc: lkml

'!' has a higher priority than '&': bitanding has no effect.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/drivers/misc/asus-laptop.c b/drivers/misc/asus-laptop.c
index 7dce318..65c67d1 100644
--- a/drivers/misc/asus-laptop.c
+++ b/drivers/misc/asus-laptop.c
@@ -322,7 +322,7 @@ static void write_status(acpi_handle handle, int out, int mask)
 
 	switch (mask) {
 	case MLED_ON:
-		out = !out & 0x1;
+		out = !(out & 0x1);
 		break;
 	case GLED_ON:
 		out = (out & 0x1) + 1;


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

* Re: [PATCH] [drivers/misc/asus-laptop.c] add parentheses
  2008-02-02 20:07 [PATCH] [drivers/misc/asus-laptop.c] add parentheses Roel Kluin
@ 2008-02-07  5:42 ` Len Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2008-02-07  5:42 UTC (permalink / raw)
  To: Roel Kluin; +Cc: corentincj, acpi4asus-user, lkml

applied.

thanks,
-Len

On Saturday 02 February 2008 15:07, Roel Kluin wrote:
> '!' has a higher priority than '&': bitanding has no effect.
> 
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
> ---
> diff --git a/drivers/misc/asus-laptop.c b/drivers/misc/asus-laptop.c
> index 7dce318..65c67d1 100644
> --- a/drivers/misc/asus-laptop.c
> +++ b/drivers/misc/asus-laptop.c
> @@ -322,7 +322,7 @@ static void write_status(acpi_handle handle, int out, int mask)
>  
>  	switch (mask) {
>  	case MLED_ON:
> -		out = !out & 0x1;
> +		out = !(out & 0x1);
>  		break;
>  	case GLED_ON:
>  		out = (out & 0x1) + 1;
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

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

end of thread, other threads:[~2008-02-07  5:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-02 20:07 [PATCH] [drivers/misc/asus-laptop.c] add parentheses Roel Kluin
2008-02-07  5:42 ` Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).