qdev: move qdev->info to class

Right now, DeviceInfo acts as the class for qdev.  In order to switch to a
proper ObjectClass derivative, we need to ween all of the callers off of
interacting directly with the info pointer.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Anthony Liguori 2011-12-04 11:08:36 -06:00
parent 32fea4025b
commit 30fbb9fc7c
33 changed files with 119 additions and 93 deletions

View file

@ -250,7 +250,7 @@ int usb_claim_port(USBDevice *dev)
return -1;
}
} else {
if (bus->nfree == 1 && strcmp(dev->qdev.info->name, "usb-hub") != 0) {
if (bus->nfree == 1 && strcmp(qdev_get_info(&dev->qdev)->name, "usb-hub") != 0) {
/* Create a new hub and chain it on */
usb_create_simple(bus, "usb-hub");
}