X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fusb%2Fserial%2Fspcp8x5.c;h=55b2570b8b8b568ad0e694ed575d8153ed4333f6;hb=dddec01eb8e2b56267b37a6f9f0997a64b4e0b2a;hp=2282d620186e2122fadbb0bf1c9bbed1a52ac6f7;hpb=bc84e0a160e383deb56568f4e03bc51b1ce16775;p=linux-2.6-omap-h63xx.git 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);