diff options
Diffstat (limited to 'drivers/usb/serial/spcp8x5.c')
-rw-r--r-- | drivers/usb/serial/spcp8x5.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c index 2282d620186e..55b2570b8b8b 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) | |||
310 | struct spcp8x5_private *priv; | 310 | struct spcp8x5_private *priv; |
311 | int i; | 311 | int i; |
312 | enum spcp8x5_type type = SPCP825_007_TYPE; | 312 | enum spcp8x5_type type = SPCP825_007_TYPE; |
313 | u16 product = le16_to_cpu(serial->dev->descriptor.idProduct); | ||
313 | 314 | ||
314 | if (serial->dev->descriptor.idProduct == 0x0201) | 315 | if (product == 0x0201) |
315 | type = SPCP825_007_TYPE; | 316 | type = SPCP825_007_TYPE; |
316 | else if (serial->dev->descriptor.idProduct == 0x0231) | 317 | else if (product == 0x0231) |
317 | type = SPCP835_TYPE; | 318 | type = SPCP835_TYPE; |
318 | else if (serial->dev->descriptor.idProduct == 0x0235) | 319 | else if (product == 0x0235) |
319 | type = SPCP825_008_TYPE; | 320 | type = SPCP825_008_TYPE; |
320 | else if (serial->dev->descriptor.idProduct == 0x0204) | 321 | else if (product == 0x0204) |
321 | type = SPCP825_INTERMATIC_TYPE; | 322 | type = SPCP825_INTERMATIC_TYPE; |
322 | else if (serial->dev->descriptor.idProduct == 0x0471 && | 323 | else if (product == 0x0471 && |
323 | serial->dev->descriptor.idVendor == 0x081e) | 324 | serial->dev->descriptor.idVendor == cpu_to_le16(0x081e)) |
324 | type = SPCP825_PHILIP_TYPE; | 325 | type = SPCP825_PHILIP_TYPE; |
325 | dev_dbg(&serial->dev->dev, "device type = %d\n", (int)type); | 326 | dev_dbg(&serial->dev->dev, "device type = %d\n", (int)type); |
326 | 327 | ||