From: Sebastian Andrzej Siewior Date: Tue, 18 Dec 2012 14:25:46 +0000 (+0100) Subject: usb/core: consider link speed while looking at bMaxPower X-Git-Tag: v3.9-rc1~126^2~71 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d8479db3dde3ef7a9bc803e565842764fa21a53;p=pandora-kernel.git usb/core: consider link speed while looking at bMaxPower The USB 2.0 specification says that bMaxPower is the maximum power consumption expressed in 2 mA units and the USB 3.0 specification says that it is expressed in 8 mA units. This patch adds a helper function usb_get_max_power() which computes the value based on config & usb_device's speed value. The the device descriptor dump computes the value on its own. Cc: Sarah Sharp Cc: Greg Kroah-Hartman Acked-by: Alan Stern Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed