Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c4d46eb authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Felipe Balbi
Browse files

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: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 9830317a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -86,7 +86,7 @@ static struct usb_device_descriptor device_desc = {
	/* .bMaxPacketSize0 = f(hardware) */
	/* .bMaxPacketSize0 = f(hardware) */
	.idVendor =		cpu_to_le16(GS_VENDOR_ID),
	.idVendor =		cpu_to_le16(GS_VENDOR_ID),
	/* .idProduct =	f(use_acm) */
	/* .idProduct =	f(use_acm) */
	.bcdDevice = cpu_to_le16(GS_VERSION_NUM << 16),
	.bcdDevice = cpu_to_le16(GS_VERSION_NUM),
	/* .iManufacturer = DYNAMIC */
	/* .iManufacturer = DYNAMIC */
	/* .iProduct = DYNAMIC */
	/* .iProduct = DYNAMIC */
	.bNumConfigurations =	1,
	.bNumConfigurations =	1,