Thread (7 messages) read the whole thread 7 messages, 3 authors, 2011-10-21

RE: [PATCH] input:ad7879-i2c use swapped varient of i2c_smbus_read_word_data

From: "Hennerich, Michael" <Michael.Hennerich@analog.com>
Date: 2011-10-21 10:40:18

Jonathan Cameron wrote on 2011-10-21:
This varient was introduced in
i2c: boilerplate function for byte swapped smbus_write/read_word_data

This also has the side effect of ensuring any errors from the i2c
read and no longer mangled.

Signed-off-by: Jonathan Cameron <redacted>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
quoted hunk ↗ jump to hunk
---
The patch introducing this swapped function is working its way through
the i2c
tree.

 drivers/input/touchscreen/ad7879-i2c.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/input/touchscreen/ad7879-i2c.c
b/drivers/input/touchscreen/ad7879-i2c.c index 4e4e58c..1c1683e 100644
--- a/drivers/input/touchscreen/ad7879-i2c.c +++
b/drivers/input/touchscreen/ad7879-i2c.c @@ -47,7 +47,7 @@ static int
ad7879_i2c_read(struct device *dev, u8 reg)
 {
      struct i2c_client *client = to_i2c_client(dev);
-     return swab16(i2c_smbus_read_word_data(client, reg));
+     return i2c_smbus_read_word_swapped(client, reg);
 }

 static int ad7879_i2c_multi_read(struct device *dev,
Greetings,
Michael

--
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin, Margaret Seif


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help