DORMANTno replies

[PATCH] Allow kxtj9 accelerometer driver to work on kxtf9

From: Alexander Tarasikov <hidden>
Date: 2012-01-14 00:57:20
Subsystem: input (keyboard, mouse, joystick, touchscreen) drivers, the rest · Maintainers: Dmitry Torokhov, Linus Torvalds

	Kionix kxtj9 is a pin- and register-compatible replacement
	for the kxtf9 accelerometer. This patch makes the kxtj9 driver
	probe routine accept kxtf9. This has been tested briefly on
	a kxtf9 accelerometer and seems to report correct results.

Signed-off-by: Alexander Tarasikov <redacted>
---
 drivers/input/misc/kxtj9.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/input/misc/kxtj9.c b/drivers/input/misc/kxtj9.c
index 783597a..c54fe18 100644
--- a/drivers/input/misc/kxtj9.c
+++ b/drivers/input/misc/kxtj9.c
@@ -487,7 +487,10 @@ static int __devinit kxtj9_verify(struct kxtj9_data *tj9)
 		goto out;
 	}
 
-	retval = retval != 0x06 ? -EIO : 0;
+	if (retval == 0x6 || retval == 0x1)
+		retval = 0;
+	else
+		retval = -EIO;
 
 out:
 	kxtj9_device_power_off(tj9);
-- 
1.7.7.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help