pl2303: simplify the else-if contruct for type_1 chips in pl2303_startup()
authorFrank Schäfer <fschaefer.oss@googlemail.com>
Wed, 14 Aug 2013 18:09:09 +0000 (20:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Aug 2013 19:12:42 +0000 (12:12 -0700)
There is no need for two else-if constructs for the type_1 chip
detection in pl2303_startup(), so merge them.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/pl2303.c

index 6638c5d9079d9ff144dbcdf0a78a4b4348fd8f89..7efb39cd6f74b43ea425509e9d4260826c352f11 100644 (file)
@@ -193,9 +193,8 @@ static int pl2303_startup(struct usb_serial *serial)
                type = type_0;
        else if (serial->dev->descriptor.bMaxPacketSize0 == 0x40)
                type = HX;
-       else if (serial->dev->descriptor.bDeviceClass == 0x00)
-               type = type_1;
-       else if (serial->dev->descriptor.bDeviceClass == 0xFF)
+       else if (serial->dev->descriptor.bDeviceClass == 0x00
+                || serial->dev->descriptor.bDeviceClass == 0xFF)
                type = type_1;
        dev_dbg(&serial->interface->dev, "device type: %d\n", type);