summaryrefslogtreecommitdiff
path: root/hw/usb/desc.c
diff options
context:
space:
mode:
authorPantelis Koukousoulas <pktoss@gmail.com>2013-12-16 09:42:49 +0200
committerGerd Hoffmann <kraxel@redhat.com>2014-02-18 15:39:12 +0100
commitbd93976a1ad9cca9636da66dfde98a41e573130c (patch)
tree3c337768b23ec9c6ae31f6e92bb21d162db3cd18 /hw/usb/desc.c
parent46eef33b89e936ca793e13c4aeea1414e97e8dbb (diff)
downloadqemu-bd93976a1ad9cca9636da66dfde98a41e573130c.tar.gz
usb: Remove magic constants from device bmAttributes
Replace magic constants in device bmAttributes with symbolic ones from Linux kernel ch9.h Signed-off-by: Pantelis Koukousoulas <pktoss@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/desc.c')
-rw-r--r--hw/usb/desc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/usb/desc.c b/hw/usb/desc.c
index f133ddb9db..ab48691363 100644
--- a/hw/usb/desc.c
+++ b/hw/usb/desc.c
@@ -759,7 +759,7 @@ int usb_desc_handle_control(USBDevice *dev, USBPacket *p,
* We return the same value that a configured device would return if
* it used the first configuration.
*/
- if (config->bmAttributes & 0x40) {
+ if (config->bmAttributes & USB_CFG_ATT_SELFPOWER) {
data[0] |= 1 << USB_DEVICE_SELF_POWERED;
}
if (dev->remote_wakeup) {