ChangeSet 1.1504.2.18, 2003/12/09 09:53:57-08:00, [EMAIL PROTECTED] [PATCH] USB: further cleanup in usblp
somebody built his own version of be16_to_cpu(). Such things affect maintainability. drivers/usb/class/usblp.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -Nru a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c --- a/drivers/usb/class/usblp.c Mon Dec 29 14:25:04 2003 +++ b/drivers/usb/class/usblp.c Mon Dec 29 14:25:04 2003 @@ -1091,7 +1091,7 @@ /* 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) ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel