summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2017-05-11 09:36:01 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-25 13:44:38 (GMT)
commitb9c0da6219e19901c5bea6e5c19514929dae9e18 (patch)
tree1a3f224145a958cd9d570940f4f1f44bf16689f4
parent545a3171d37fdb5b9390a0852093309dd03ba2a5 (diff)
downloadlinux-b9c0da6219e19901c5bea6e5c19514929dae9e18.tar.xz
USB: chaoskey: fix Alea quirk on big-endian hosts
commit 63afd5cc78775018ea2dec4004428dafa5283e93 upstream. Add missing endianness conversion when applying the Alea timeout quirk. Found using sparse: warning: restricted __le16 degrades to integer Fixes: e4a886e811cd ("hwrng: chaoskey - Fix URB warning due to timeout on Alea") Cc: Bob Ham <bob.ham@collabora.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Keith Packard <keithp@keithp.com> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/misc/chaoskey.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/misc/chaoskey.c b/drivers/usb/misc/chaoskey.c
index 6ddd08a..efecb87 100644
--- a/drivers/usb/misc/chaoskey.c
+++ b/drivers/usb/misc/chaoskey.c
@@ -194,7 +194,7 @@ static int chaoskey_probe(struct usb_interface *interface,
dev->in_ep = in_ep;
- if (udev->descriptor.idVendor != ALEA_VENDOR_ID)
+ if (le16_to_cpu(udev->descriptor.idVendor) != ALEA_VENDOR_ID)
dev->reads_started = 1;
dev->size = size;