From 5c4d46eb89fe99011a02048533857345d9e8b506 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Mon, 10 Sep 2012 19:06:44 +0200 Subject: [PATCH] usb: gadget serial: don't shift bcd version left by 16 Fengguang Wu reported: |drivers/usb/gadget/serial.c:89:22: sparse: cast truncates bits from |constant value (24000000 becomes 0) I obviously let the version number shift away. Since the version is a 16bit number it can be applied as it. Cc: fengguang.wu@intel.com Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Felipe Balbi --- drivers/usb/gadget/serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c index 942067327d8..44752f531e8 100644 --- a/drivers/usb/gadget/serial.c +++ b/drivers/usb/gadget/serial.c @@ -86,7 +86,7 @@ static struct usb_device_descriptor device_desc = { /* .bMaxPacketSize0 = f(hardware) */ .idVendor = cpu_to_le16(GS_VENDOR_ID), /* .idProduct = f(use_acm) */ - .bcdDevice = cpu_to_le16(GS_VERSION_NUM << 16), + .bcdDevice = cpu_to_le16(GS_VERSION_NUM), /* .iManufacturer = DYNAMIC */ /* .iProduct = DYNAMIC */ .bNumConfigurations = 1, -- 2.20.1