From: Lee, Chun-Yi Date: Fri, 15 Apr 2011 10:42:47 +0000 (+0800) Subject: acer-wmi: does not allow negative number set to initial device state X-Git-Tag: v3.0-rc1~4^2^2~16 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2647b5e99c8ff1b3f535c7c84564cdc53214edf;p=pandora-kernel.git 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 Cc: Matthew Garrett Cc: Dmitry Torokhov Cc: Corentin Chary Signed-off-by: Lee, Chun-Yi Signed-off-by: Matthew Garrett --- 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) * 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); } /*