]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/input/misc/wistron_btns.c
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
[linux-2.6-omap-h63xx.git] / drivers / input / misc / wistron_btns.c
index 72176f3d49cb3ad5e0c091c35fdcebff9047a984..fe268be3293b666e82b1e567bb645fb5847a3c5f 100644 (file)
@@ -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;
                }