diff options
author | Du, ChangbinX <changbinx.du@intel.com> | 2013-12-17 11:47:42 +0000 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-08-08 14:37:52 +0900 |
commit | 94ef356d8b18da94289d86802c1561f73ce68917 (patch) | |
tree | 4c0dfa80fe3c9d15e1c63db884849b11f4bfbc0b | |
parent | 4de005cf7a0306206e4ebaf07fb77af2a198cba3 (diff) | |
download | linux-3.10-94ef356d8b18da94289d86802c1561f73ce68917.tar.gz linux-3.10-94ef356d8b18da94289d86802c1561f73ce68917.tar.bz2 linux-3.10-94ef356d8b18da94289d86802c1561f73ce68917.zip |
usb: gadget: should use u16 type variable to store MaxPower
From 7e827a0d300e084f74c65122baa5e3193f9a7f18 Mon Sep 17 00:00:00 2001
From: "Du, Changbin" <changbinx.du@intel.com>
Date: Mon, 16 Dec 2013 20:32:13 +0800
Subject: [PATCH] usb/gadget: should use u16 type variable to store MaxPower
The MaxPower field is of u16 type. So using u8 type variable can break
data (high byte lost).
Signed-off-by: Du, Changbin <changbinx.du@intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/gadget/composite.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 03abdb5d206..d41103e13b1 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -1728,7 +1728,7 @@ composite_resume(struct usb_gadget *gadget) { struct usb_composite_dev *cdev = get_gadget_data(gadget); struct usb_function *f; - u8 maxpower; + u16 maxpower; /* REVISIT: should we have config level * suspend/resume callbacks? |