From fd05e720099e8eeddb378305d1a41c1445344b91 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Mon, 28 Apr 2008 07:00:16 +0100 Subject: drivers/usb annotations and fixes * endianness annotations * endianness fixes * missing get_unaligned/put_unaligned It's pretty much all over the place, changes to different files are independent. Signed-off-by: Al Viro Serial-parts-Acked-by: Alan Cox Signed-off-by: Linus Torvalds --- drivers/usb/serial/spcp8x5.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'drivers/usb/serial/spcp8x5.c') diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c index 2282d620186..55b2570b8b8 100644 --- a/drivers/usb/serial/spcp8x5.c +++ b/drivers/usb/serial/spcp8x5.c @@ -310,17 +310,18 @@ static int spcp8x5_startup(struct usb_serial *serial) struct spcp8x5_private *priv; int i; enum spcp8x5_type type = SPCP825_007_TYPE; + u16 product = le16_to_cpu(serial->dev->descriptor.idProduct); - if (serial->dev->descriptor.idProduct == 0x0201) + if (product == 0x0201) type = SPCP825_007_TYPE; - else if (serial->dev->descriptor.idProduct == 0x0231) + else if (product == 0x0231) type = SPCP835_TYPE; - else if (serial->dev->descriptor.idProduct == 0x0235) + else if (product == 0x0235) type = SPCP825_008_TYPE; - else if (serial->dev->descriptor.idProduct == 0x0204) + else if (product == 0x0204) type = SPCP825_INTERMATIC_TYPE; - else if (serial->dev->descriptor.idProduct == 0x0471 && - serial->dev->descriptor.idVendor == 0x081e) + else if (product == 0x0471 && + serial->dev->descriptor.idVendor == cpu_to_le16(0x081e)) type = SPCP825_PHILIP_TYPE; dev_dbg(&serial->dev->dev, "device type = %d\n", (int)type); -- cgit v1.2.3