USB: chaoskey: fix Alea quirk on big-endian hosts

Add missing endianness conversion when applying the Alea timeout quirk.

Found using sparse:

	warning: restricted __le16 degrades to integer

Fixes: e4a886e811 ("hwrng: chaoskey - Fix URB warning due to timeout on Alea")
Cc: stable <[email protected]>     # 4.8
Cc: Bob Ham <[email protected]>
Cc: Herbert Xu <[email protected]>
Cc: Keith Packard <[email protected]>
Signed-off-by: Johan Hovold <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
Johan Hovold authored and Greg Kroah-Hartman committed 2017-05-17 11:27:41 +02:00
1 parent 7cdfe4ddea
commit 63afd5cc78
1 file changed
+1 -1
+1 -1
View File
@@ -192,7 +192,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;