Skip to content

Commit

Permalink
acer-wmi: does not allow negative number set to initial device state
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lee, Chun-Yi authored and Matthew Garrett committed May 27, 2011
1 parent bb3ce20 commit c2647b5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/platform/x86/acer-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -961,10 +961,12 @@ static void __init acer_commandline_init(void)
* These will all fail silently if the value given is invalid, or the
* capability isn't available on the given interface
*/
set_u32(mailled, ACER_CAP_MAILLED);
if (!has_type_aa)
if (mailled >= 0)
set_u32(mailled, ACER_CAP_MAILLED);
if (!has_type_aa && threeg >= 0)
set_u32(threeg, ACER_CAP_THREEG);
set_u32(brightness, ACER_CAP_BRIGHTNESS);
if (brightness >= 0)
set_u32(brightness, ACER_CAP_BRIGHTNESS);
}

/*
Expand Down

0 comments on commit c2647b5

Please sign in to comment.