Commit 4c15dcb4 authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman

[PATCH] USB: further cleanup in usblp

somebody built his own version of be16_to_cpu(). Such things affect
maintainability.
parent 06819dfe
......@@ -1091,7 +1091,7 @@ static int usblp_cache_device_id_string(struct usblp *usblp)
/* First two bytes are length in big-endian.
* They count themselves, and we copy them into
* the user's buffer. */
length = (usblp->device_id_string[0] << 8) + usblp->device_id_string[1];
length = be16_to_cpu(*((u16 *)usblp->device_id_string));
if (length < 2)
length = 2;
else if (length >= USBLP_DEVICE_ID_SIZE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment