diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c index 72176f3d49cb3ad5e0c091c35fdcebff9047a984..fe268be3293b666e82b1e567bb645fb5847a3c5f 100644 --- a/drivers/input/misc/wistron_btns.c +++ b/drivers/input/misc/wistron_btns.c @@ -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; }