Skip to contentSkip to conversation

wistron: fix detection of special buttons

PATCH New Reiner Herrmann 1 participant 1 message Sep 19, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wistron: fix detection of special buttons

If either a wifi or a bluetooth button has been detected, the code would break off the loop. But there are laptops that have both types of buttons, so the loop has to continue checking.

---

drivers/input/misc/wistron_btns.c +2 -5
diff -uprN -X linux-2.6.18-rc7/Documentation/dontdiff linux-2.6.18-rc7/drivers/input/misc/wistron_btns.c linux-work/drivers/input/misc/wistron_btns.c
@@ -248,13 +248,10 @@ static int __init dmi_matched(struct dmi
 
 	keymap = dmi->driver_data;
 	for (key = keymap; key->type != KE_END; key++) {
-		if (key->type == KE_WIFI) {
+		if (key->type == KE_WIFI)
 			have_wifi = 1;
-			break;
-		} else if (key->type == KE_BLUETOOTH) {
+		else if (key->type == KE_BLUETOOTH)
 			have_bluetooth = 1;
-			break;
-		}
 	}
 	return 1;
 }