usb-bus: introduce a wrapper function to check speed
commit594a53607e5bd4a2b7555a7a2908d2c406fea9aa
authorGonglei <arei.gonglei@huawei.com>
Fri, 19 Sep 2014 07:25:20 +0000 (19 15:25 +0800)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 23 Sep 2014 10:51:08 +0000 (23 12:51 +0200)
tree6be9713bb4f70985f5d36c8651881b21f84b478a
parentbd2ba2752d860d5a0b4f328332c3e0b79d275de8
usb-bus: introduce a wrapper function to check speed

In this way, we can check speed directly, don't need
call usb_device_attach(), which has other conditions,
such as checking the chardev is open.

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/bus.c
include/hw/usb.h