diff options
| author | Lee, Chun-Yi <joeyli.kernel@gmail.com> | 2011-04-15 06:42:47 -0400 |
|---|---|---|
| committer | Matthew Garrett <mjg@redhat.com> | 2011-05-27 12:36:44 -0400 |
| commit | c2647b5e99c8ff1b3f535c7c84564cdc53214edf (patch) | |
| tree | 7e2109c49d9a4cef393675986d5e668860311f06 | |
| parent | bb3ce2020451bdebe5ceac770504f427724008a9 (diff) | |
acer-wmi: does not allow negative number set to initial device state
The driver set module parameter value: mailled, threeg and brightness
to BIOS by evaluate wmi method when driver was initialed. The default
values for those parameters are -1, so, that will be better don't set
negative value to BIOS.
Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
| -rw-r--r-- | drivers/platform/x86/acer-wmi.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index fa8fa73f543e..0682ecb30746 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c | |||
| @@ -961,10 +961,12 @@ static void __init acer_commandline_init(void) | |||
| 961 | * These will all fail silently if the value given is invalid, or the | 961 | * These will all fail silently if the value given is invalid, or the |
| 962 | * capability isn't available on the given interface | 962 | * capability isn't available on the given interface |
| 963 | */ | 963 | */ |
| 964 | set_u32(mailled, ACER_CAP_MAILLED); | 964 | if (mailled >= 0) |
| 965 | if (!has_type_aa) | 965 | set_u32(mailled, ACER_CAP_MAILLED); |
| 966 | if (!has_type_aa && threeg >= 0) | ||
| 966 | set_u32(threeg, ACER_CAP_THREEG); | 967 | set_u32(threeg, ACER_CAP_THREEG); |
| 967 | set_u32(brightness, ACER_CAP_BRIGHTNESS); | 968 | if (brightness >= 0) |
| 969 | set_u32(brightness, ACER_CAP_BRIGHTNESS); | ||
| 968 | } | 970 | } |
| 969 | 971 | ||
| 970 | /* | 972 | /* |
