diff options
author | Andreas Färber <afaerber@suse.de> | 2013-01-10 16:19:07 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-01-10 15:11:53 -0600 |
commit | 8c43a6f05d5ef3c9484bd2be9d4e818d58e62016 (patch) | |
tree | 900e988283ce06cb52a98d203cd910093c39509d /hw/usb | |
parent | a6308bc2224db238e72c570482717b68246a7ce0 (diff) | |
download | qemu-8c43a6f05d5ef3c9484bd2be9d4e818d58e62016.zip qemu-8c43a6f05d5ef3c9484bd2be9d4e818d58e62016.tar.gz qemu-8c43a6f05d5ef3c9484bd2be9d4e818d58e62016.tar.bz2 |
Make all static TypeInfos const
Since 39bffca2030950ef6efe57c2fac8327a45ae1015 (qdev: register all
types natively through QEMU Object Model), TypeInfo as used in
the common, non-iterative pattern is no longer amended with information
and should therefore be const.
Fix the documented QOM examples:
sed -i 's/static TypeInfo/static const TypeInfo/g' include/qom/object.h
Since frequently the wrong examples are being copied by contributors of
new devices, fix all types in the tree:
sed -i 's/^static TypeInfo/static const TypeInfo/g' */*.c
sed -i 's/^static TypeInfo/static const TypeInfo/g' */*/*.c
This also avoids to piggy-back these changes onto real functional
changes or other refactorings.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/usb')
-rw-r--r-- | hw/usb/bus.c | 2 | ||||
-rw-r--r-- | hw/usb/dev-audio.c | 2 | ||||
-rw-r--r-- | hw/usb/dev-bluetooth.c | 2 | ||||
-rw-r--r-- | hw/usb/dev-hid.c | 6 | ||||
-rw-r--r-- | hw/usb/dev-hub.c | 2 | ||||
-rw-r--r-- | hw/usb/dev-network.c | 2 | ||||
-rw-r--r-- | hw/usb/dev-serial.c | 4 | ||||
-rw-r--r-- | hw/usb/dev-smartcard-reader.c | 4 | ||||
-rw-r--r-- | hw/usb/dev-storage.c | 2 | ||||
-rw-r--r-- | hw/usb/dev-uas.c | 2 | ||||
-rw-r--r-- | hw/usb/dev-wacom.c | 2 | ||||
-rw-r--r-- | hw/usb/hcd-ohci.c | 4 | ||||
-rw-r--r-- | hw/usb/hcd-xhci.c | 2 | ||||
-rw-r--r-- | hw/usb/host-bsd.c | 2 | ||||
-rw-r--r-- | hw/usb/host-linux.c | 2 | ||||
-rw-r--r-- | hw/usb/redirect.c | 2 |
16 files changed, 21 insertions, 21 deletions
diff --git a/hw/usb/bus.c b/hw/usb/bus.c index 180d1d7..2dc7675 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -628,7 +628,7 @@ static void usb_device_class_init(ObjectClass *klass, void *data) k->props = usb_props; } -static TypeInfo usb_device_type_info = { +static const TypeInfo usb_device_type_info = { .name = TYPE_USB_DEVICE, .parent = TYPE_DEVICE, .instance_size = sizeof(USBDevice), diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c index b669601..b8c79b8 100644 --- a/hw/usb/dev-audio.c +++ b/hw/usb/dev-audio.c @@ -684,7 +684,7 @@ static void usb_audio_class_init(ObjectClass *klass, void *data) k->set_interface = usb_audio_set_interface; } -static TypeInfo usb_audio_info = { +static const TypeInfo usb_audio_info = { .name = "usb-audio", .parent = TYPE_USB_DEVICE, .instance_size = sizeof(USBAudioState), diff --git a/hw/usb/dev-bluetooth.c b/hw/usb/dev-bluetooth.c index a0d7a88..adbf9d4 100644 --- a/hw/usb/dev-bluetooth.c +++ b/hw/usb/dev-bluetooth.c @@ -555,7 +555,7 @@ static void usb_bt_class_initfn(ObjectClass *klass, void *data) dc->vmsd = &vmstate_usb_bt; } -static TypeInfo bt_info = { +static const TypeInfo bt_info = { .name = "usb-bt-dongle", .parent = TYPE_USB_DEVICE, .instance_size = sizeof(struct USBBtState), diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c index b4ace04..29b6481 100644 --- a/hw/usb/dev-hid.c +++ b/hw/usb/dev-hid.c @@ -657,7 +657,7 @@ static void usb_tablet_class_initfn(ObjectClass *klass, void *data) dc->props = usb_tablet_properties; } -static TypeInfo usb_tablet_info = { +static const TypeInfo usb_tablet_info = { .name = "usb-tablet", .parent = TYPE_USB_DEVICE, .instance_size = sizeof(USBHIDState), @@ -676,7 +676,7 @@ static void usb_mouse_class_initfn(ObjectClass *klass, void *data) dc->vmsd = &vmstate_usb_ptr; } -static TypeInfo usb_mouse_info = { +static const TypeInfo usb_mouse_info = { .name = "usb-mouse", .parent = TYPE_USB_DEVICE, .instance_size = sizeof(USBHIDState), @@ -695,7 +695,7 @@ static void usb_keyboard_class_initfn(ObjectClass *klass, void *data) dc->vmsd = &vmstate_usb_kbd; } -static TypeInfo usb_keyboard_info = { +static const TypeInfo usb_keyboard_info = { .name = "usb-kbd", .parent = TYPE_USB_DEVICE, .instance_size = sizeof(USBHIDState), diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c index 470fbbb..79f2f46 100644 --- a/hw/usb/dev-hub.c +++ b/hw/usb/dev-hub.c @@ -568,7 +568,7 @@ static void usb_hub_class_initfn(ObjectClass *klass, void *data) dc->vmsd = &vmstate_usb_hub; } -static TypeInfo hub_info = { +static const TypeInfo hub_info = { .name = "usb-hub", .parent = TYPE_USB_DEVICE, .instance_size = sizeof(USBHubState), diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c index 1c54863..9dede4c 100644 --- a/hw/usb/dev-network.c +++ b/hw/usb/dev-network.c @@ -1433,7 +1433,7 @@ static void usb_net_class_initfn(ObjectClass *klass, void *data) dc->props = net_properties; } -static TypeInfo net_info = { +static const TypeInfo net_info = { .name = "usb-net", .parent = TYPE_USB_DEVICE, .instance_size = sizeof(USBNetState), diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c index 20cf533..47ac8c9 100644 --- a/hw/usb/dev-serial.c +++ b/hw/usb/dev-serial.c @@ -600,7 +600,7 @@ static void usb_serial_class_initfn(ObjectClass *klass, void *data) dc->props = serial_properties; } -static TypeInfo serial_info = { +static const TypeInfo serial_info = { .name = "usb-serial", .parent = TYPE_USB_DEVICE, .instance_size = sizeof(USBSerialState), @@ -628,7 +628,7 @@ static void usb_braille_class_initfn(ObjectClass *klass, void *data) dc->props = braille_properties; } -static TypeInfo braille_info = { +static const TypeInfo braille_info = { .name = "usb-braille", .parent = TYPE_USB_DEVICE, .instance_size = sizeof(USBSerialState), diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index f26bb34..979a473 100644 --- a/hw/usb/dev-smartcard-reader.c +++ b/hw/usb/dev-smartcard-reader.c @@ -1322,7 +1322,7 @@ static void ccid_class_initfn(ObjectClass *klass, void *data) dc->props = ccid_properties; } -static TypeInfo ccid_info = { +static const TypeInfo ccid_info = { .name = CCID_DEV_NAME, .parent = TYPE_USB_DEVICE, .instance_size = sizeof(USBCCIDState), @@ -1338,7 +1338,7 @@ static void ccid_card_class_init(ObjectClass *klass, void *data) k->props = ccid_props; } -static TypeInfo ccid_card_type_info = { +static const TypeInfo ccid_card_type_info = { .name = TYPE_CCID_CARD, .parent = TYPE_DEVICE, .instance_size = sizeof(CCIDCardState), diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index 5025597..1b87352 100644 --- a/hw/usb/dev-storage.c +++ b/hw/usb/dev-storage.c @@ -716,7 +716,7 @@ static void usb_msd_class_initfn(ObjectClass *klass, void *data) dc->props = msd_properties; } -static TypeInfo msd_info = { +static const TypeInfo msd_info = { .name = "usb-storage", .parent = TYPE_USB_DEVICE, .instance_size = sizeof(MSDState), diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index 9a00889..d904d1a 100644 --- a/hw/usb/dev-uas.c +++ b/hw/usb/dev-uas.c @@ -757,7 +757,7 @@ static void usb_uas_class_initfn(ObjectClass *klass, void *data) dc->vmsd = &vmstate_usb_uas; } -static TypeInfo uas_info = { +static const TypeInfo uas_info = { .name = "usb-uas", .parent = TYPE_USB_DEVICE, .instance_size = sizeof(UASDevice), diff --git a/hw/usb/dev-wacom.c b/hw/usb/dev-wacom.c index 9ab368a..ab9fa2e 100644 --- a/hw/usb/dev-wacom.c +++ b/hw/usb/dev-wacom.c @@ -366,7 +366,7 @@ static void usb_wacom_class_init(ObjectClass *klass, void *data) dc->vmsd = &vmstate_usb_wacom; } -static TypeInfo wacom_info = { +static const TypeInfo wacom_info = { .name = "usb-wacom-tablet", .parent = TYPE_USB_DEVICE, .instance_size = sizeof(USBWacomState), diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index 29bafa6..6a2f5f8 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -1909,7 +1909,7 @@ static void ohci_pci_class_init(ObjectClass *klass, void *data) dc->props = ohci_pci_properties; } -static TypeInfo ohci_pci_info = { +static const TypeInfo ohci_pci_info = { .name = "pci-ohci", .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(OHCIPCIState), @@ -1932,7 +1932,7 @@ static void ohci_sysbus_class_init(ObjectClass *klass, void *data) dc->props = ohci_sysbus_properties; } -static TypeInfo ohci_sysbus_info = { +static const TypeInfo ohci_sysbus_info = { .name = "sysbus-ohci", .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(OHCISysBusState), diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 9132920..92f2eee 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -3182,7 +3182,7 @@ static void xhci_class_init(ObjectClass *klass, void *data) k->no_hotplug = 1; } -static TypeInfo xhci_info = { +static const TypeInfo xhci_info = { .name = "nec-usb-xhci", .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(XHCIState), diff --git a/hw/usb/host-bsd.c b/hw/usb/host-bsd.c index 340c21a..172aecb 100644 --- a/hw/usb/host-bsd.c +++ b/hw/usb/host-bsd.c @@ -407,7 +407,7 @@ static void usb_host_class_initfn(ObjectClass *klass, void *data) uc->handle_destroy = usb_host_handle_destroy; } -static TypeInfo usb_host_dev_info = { +static const TypeInfo usb_host_dev_info = { .name = "usb-host", .parent = TYPE_USB_DEVICE, .instance_size = sizeof(USBHostDevice), diff --git a/hw/usb/host-linux.c b/hw/usb/host-linux.c index 669fbd2..e8e6a42 100644 --- a/hw/usb/host-linux.c +++ b/hw/usb/host-linux.c @@ -1534,7 +1534,7 @@ static void usb_host_class_initfn(ObjectClass *klass, void *data) dc->props = usb_host_dev_properties; } -static TypeInfo usb_host_dev_info = { +static const TypeInfo usb_host_dev_info = { .name = "usb-host", .parent = TYPE_USB_DEVICE, .instance_size = sizeof(USBHostDevice), diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index f1bf84c..8c0ead0 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -2341,7 +2341,7 @@ static void usbredir_class_initfn(ObjectClass *klass, void *data) dc->props = usbredir_properties; } -static TypeInfo usbredir_dev_info = { +static const TypeInfo usbredir_dev_info = { .name = "usb-redir", .parent = TYPE_USB_DEVICE, .instance_size = sizeof(USBRedirDevice), |