From a3a333b6abe8e0bb58a70cd66252fe5e77eb75a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Piel?= Date: Thu, 26 Jun 2008 11:05:01 -0400 Subject: [PATCH] --- yaml --- r: 104209 b: refs/heads/master c: a894403766c93a8fae6de15684aa559fc78d5530 h: refs/heads/master i: 104207: 9bf1c90b0925fb8ed3b18de3da990019affa32d5 v: v3 --- [refs] | 2 +- trunk/drivers/input/misc/wistron_btns.c | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 801d83db25fb..973002caf09b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5a54c0115757fd98ca05efae626e6aebf54a8427 +refs/heads/master: a894403766c93a8fae6de15684aa559fc78d5530 diff --git a/trunk/drivers/input/misc/wistron_btns.c b/trunk/drivers/input/misc/wistron_btns.c index 72176f3d49cb..fe268be3293b 100644 --- a/trunk/drivers/input/misc/wistron_btns.c +++ b/trunk/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; }