From 8c43a6f05d5ef3c9484bd2be9d4e818d58e62016 Mon Sep 17 00:00:00 2001 From: Andreas Färber Date: Thu, 10 Jan 2013 16:19:07 +0100 Subject: 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 Signed-off-by: Anthony Liguori --- hw/strongarm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'hw/strongarm.c') diff --git a/hw/strongarm.c b/hw/strongarm.c index 804c1a37a6..af688ac4ca 100644 --- a/hw/strongarm.c +++ b/hw/strongarm.c @@ -212,7 +212,7 @@ static void strongarm_pic_class_init(ObjectClass *klass, void *data) dc->vmsd = &vmstate_strongarm_pic_regs; } -static TypeInfo strongarm_pic_info = { +static const TypeInfo strongarm_pic_info = { .name = "strongarm_pic", .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(StrongARMPICState), @@ -433,7 +433,7 @@ static void strongarm_rtc_sysbus_class_init(ObjectClass *klass, void *data) dc->vmsd = &vmstate_strongarm_rtc_regs; } -static TypeInfo strongarm_rtc_sysbus_info = { +static const TypeInfo strongarm_rtc_sysbus_info = { .name = "strongarm-rtc", .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(StrongARMRTCState), @@ -674,7 +674,7 @@ static void strongarm_gpio_class_init(ObjectClass *klass, void *data) dc->desc = "StrongARM GPIO controller"; } -static TypeInfo strongarm_gpio_info = { +static const TypeInfo strongarm_gpio_info = { .name = "strongarm-gpio", .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(StrongARMGPIOInfo), @@ -840,7 +840,7 @@ static void strongarm_ppc_class_init(ObjectClass *klass, void *data) dc->desc = "StrongARM PPC controller"; } -static TypeInfo strongarm_ppc_info = { +static const TypeInfo strongarm_ppc_info = { .name = "strongarm-ppc", .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(StrongARMPPCInfo), @@ -1299,7 +1299,7 @@ static void strongarm_uart_class_init(ObjectClass *klass, void *data) dc->props = strongarm_uart_properties; } -static TypeInfo strongarm_uart_info = { +static const TypeInfo strongarm_uart_info = { .name = "strongarm-uart", .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(StrongARMUARTState), @@ -1538,7 +1538,7 @@ static void strongarm_ssp_class_init(ObjectClass *klass, void *data) dc->vmsd = &vmstate_strongarm_ssp_regs; } -static TypeInfo strongarm_ssp_info = { +static const TypeInfo strongarm_ssp_info = { .name = "strongarm-ssp", .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(StrongARMSSPState), -- cgit v1.2.3-55-g7522