2010-04-06 10:44:47

by Dan Carpenter

[permalink] [raw]
Subject: [patch] asus: don't modify bluetooth/wlan on boot

We were storing -1 as an unsigned int and as a result the effect of
passing -1 was the same as using 1.

Signed-off-by: Dan Carpenter <[email protected]>

diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index 475ab50..f532336 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -78,15 +78,15 @@ static uint wapf = 1;
module_param(wapf, uint, 0644);
MODULE_PARM_DESC(wapf, "WAPF value");

-static uint wlan_status = 1;
-static uint bluetooth_status = 1;
+static int wlan_status = 1;
+static int bluetooth_status = 1;

-module_param(wlan_status, uint, 0644);
+module_param(wlan_status, int, 0644);
MODULE_PARM_DESC(wlan_status, "Set the wireless status on boot "
"(0 = disabled, 1 = enabled, -1 = don't do anything). "
"default is 1");

-module_param(bluetooth_status, uint, 0644);
+module_param(bluetooth_status, int, 0644);
MODULE_PARM_DESC(bluetooth_status, "Set the wireless status on boot "
"(0 = disabled, 1 = enabled, -1 = don't do anything). "
"default is 1");


2010-04-06 18:46:19

by Corentin Chary

[permalink] [raw]
Subject: Re: [patch] asus: don't modify bluetooth/wlan on boot

On Tue, Apr 6, 2010 at 12:44 PM, Dan Carpenter <[email protected]> wrote:
> We were storing -1 as an unsigned int and as a result the effect of
> passing -1 was the same as using 1.
>
> Signed-off-by: Dan Carpenter <[email protected]>
>
> diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
> index 475ab50..f532336 100644
> --- a/drivers/platform/x86/asus-laptop.c
> +++ b/drivers/platform/x86/asus-laptop.c
> @@ -78,15 +78,15 @@ static uint wapf = 1;
> ?module_param(wapf, uint, 0644);
> ?MODULE_PARM_DESC(wapf, "WAPF value");
>
> -static uint wlan_status = 1;
> -static uint bluetooth_status = 1;
> +static int wlan_status = 1;
> +static int bluetooth_status = 1;
>
> -module_param(wlan_status, uint, 0644);
> +module_param(wlan_status, int, 0644);
> ?MODULE_PARM_DESC(wlan_status, "Set the wireless status on boot "
> ? ? ? ? ? ? ? ? "(0 = disabled, 1 = enabled, -1 = don't do anything). "
> ? ? ? ? ? ? ? ? "default is 1");
>
> -module_param(bluetooth_status, uint, 0644);
> +module_param(bluetooth_status, int, 0644);
> ?MODULE_PARM_DESC(bluetooth_status, "Set the wireless status on boot "
> ? ? ? ? ? ? ? ? "(0 = disabled, 1 = enabled, -1 = don't do anything). "
> ? ? ? ? ? ? ? ? "default is 1");
> --

Thanks !
Acked-by: Corentin Chary <[email protected]>


--
Corentin Chary
http://xf.iksaif.net

2010-04-12 17:12:53

by Matthew Garrett

[permalink] [raw]
Subject: Re: [patch] asus: don't modify bluetooth/wlan on boot

Thanks, applied.

--
Matthew Garrett | [email protected]