i2c-tiny-usb: Fix on big-endian systems
commitd8d6782349be3b550ebe438794c327b7373ce54e
authorJean Delvare <khali@linux-fr.org>
Thu, 1 Apr 2010 22:55:46 +0000 (1 15:55 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 Apr 2010 22:55:46 +0000 (1 15:55 -0700)
treed7f9702669f2173cff860cf9e628dc6ca57b5888
parent8859bd1aef1f4030afe5aac41b685e13f31c60fb
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>
Cc: stable@kernel.org
Acked-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/i2c/busses/i2c-tiny-usb.c