i2c-tiny-usb: Fix on big-endian systems
commit17eff773b4c988e6de965446283de7315ffbac85
authorJean Delvare <khali@linux-fr.org>
Fri, 5 Feb 2010 16:48:13 +0000 (5 17:48 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 23 Feb 2010 15:37:48 +0000 (23 07:37 -0800)
tree304ad7c25cc73f7b8398cbe7e1e53de807e8339a
parentce460107ed450221d040be0cf088973e58ad23eb
i2c-tiny-usb: Fix on big-endian systems

commit 1c010ff8912cbc08d80e865aab9c32b6b00c527d upstream.

The functionality bit vector is always returned as a little-endian
32-bit number by the device, so it must be byte-swapped to the host
endianness.

On the other hand, the delay value is handled by the USB stack, so no
byte swapping is needed on our side.

This fixes bug #15105:
http://bugzilla.kernel.org/show_bug.cgi?id=15105

Reported-by: Jens Richter <jens@richter-stutensee.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Jens Richter <jens@richter-stutensee.de>
Cc: Till Harbaum <till@harbaum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/i2c/busses/i2c-tiny-usb.c