linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix off-by-one error in form factor detection.
@ 2011-07-27 20:55 Łukasz Stelmach
  2011-07-29 10:13 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: Łukasz Stelmach @ 2011-07-27 20:55 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Łukasz Stelmach

The keywords we are looking for are at odd positions.

Signed-off-by: Łukasz Stelmach <stlman@poczta.fm>
---
 plugins/formfactor.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/plugins/formfactor.c b/plugins/formfactor.c
index 758d481..33a8b32 100644
--- a/plugins/formfactor.c
+++ b/plugins/formfactor.c
@@ -104,7 +104,7 @@ static int formfactor_probe(struct btd_adapter *adapter)
 		return 0;
 	}
 
-	formfactor = chassis_map[chassis_type * 2];
+	formfactor = chassis_map[chassis_type * 2 + 1];
 	if (formfactor != NULL) {
 		if (g_str_equal(formfactor, "laptop") == TRUE)
 			minor |= (1 << 2) | (1 << 3);
-- 
1.7.3.4


----------------------------------------------------------------
Najwieksza baza samochodow nowych i uzywanych
Sprawdz >> http://linkint.pl/f29e3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-29 10:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-27 20:55 [PATCH] Fix off-by-one error in form factor detection Łukasz Stelmach
2011-07-29 10:13 ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).