提交 56b1b909 编写于 作者: D Du, ChangbinX 提交者: Felipe Balbi

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: NDu, Changbin <changbinx.du@intel.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 c4b34a3b
...@@ -1728,7 +1728,7 @@ composite_resume(struct usb_gadget *gadget) ...@@ -1728,7 +1728,7 @@ composite_resume(struct usb_gadget *gadget)
{ {
struct usb_composite_dev *cdev = get_gadget_data(gadget); struct usb_composite_dev *cdev = get_gadget_data(gadget);
struct usb_function *f; struct usb_function *f;
u8 maxpower; u16 maxpower;
/* REVISIT: should we have config level /* REVISIT: should we have config level
* suspend/resume callbacks? * suspend/resume callbacks?
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册