X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Finput%2Fmisc%2Fwistron_btns.c;h=fe268be3293b666e82b1e567bb645fb5847a3c5f;hb=6d52dcbe56ca8464bcad56d98a64bcd781596663;hp=60121f10f8d91203d481603c9295af4f52495390;hpb=939ab20152390c8ccccfa6fac0830405ca91d903;p=linux-2.6-omap-h63xx.git diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c index 60121f10f8d..fe268be3293 100644 --- a/drivers/input/misc/wistron_btns.c +++ b/drivers/input/misc/wistron_btns.c @@ -247,7 +247,7 @@ static int have_wifi; static int have_bluetooth; static int have_leds; -static int __init dmi_matched(struct dmi_system_id *dmi) +static int __init dmi_matched(const struct dmi_system_id *dmi) { const struct key_entry *key; @@ -998,12 +998,12 @@ static void wistron_wifi_led_set(struct led_classdev *led_cdev, } static struct led_classdev wistron_mail_led = { - .name = "mail:green", + .name = "wistron:green:mail", .brightness_set = wistron_mail_led_set, }; static struct led_classdev wistron_wifi_led = { - .name = "wifi:red", + .name = "wistron:red:wifi", .brightness_set = wistron_wifi_led_set, }; @@ -1186,7 +1186,7 @@ static int wistron_setkeycode(struct input_dev *dev, int scancode, int keycode) static int __devinit setup_input_dev(void) { - const struct key_entry *key; + struct key_entry *key; struct input_dev *input_dev; int error; @@ -1219,6 +1219,23 @@ static int __devinit setup_input_dev(void) set_bit(key->sw.code, input_dev->swbit); break; + /* if wifi or bluetooth are not available, create normal keys */ + case KE_WIFI: + if (!have_wifi) { + key->type = KE_KEY; + key->keycode = KEY_WLAN; + key--; + } + break; + + case KE_BLUETOOTH: + if (!have_bluetooth) { + key->type = KE_KEY; + key->keycode = KEY_BLUETOOTH; + key--; + } + break; + default: break; }