mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-30 13:31:52 -06:00
hw: Make class data 'const'
When the %data argument is not modified, we can declare it const. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250210133134.90879-8-philmd@linaro.org>
This commit is contained in:
parent
d31f1185fb
commit
788369f477
4 changed files with 4 additions and 4 deletions
|
@ -322,6 +322,6 @@ void sdhci_initfn(SDHCIState *s);
|
||||||
void sdhci_uninitfn(SDHCIState *s);
|
void sdhci_uninitfn(SDHCIState *s);
|
||||||
void sdhci_common_realize(SDHCIState *s, Error **errp);
|
void sdhci_common_realize(SDHCIState *s, Error **errp);
|
||||||
void sdhci_common_unrealize(SDHCIState *s);
|
void sdhci_common_unrealize(SDHCIState *s);
|
||||||
void sdhci_common_class_init(ObjectClass *klass, void *data);
|
void sdhci_common_class_init(ObjectClass *klass, const void *data);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1542,7 +1542,7 @@ const VMStateDescription sdhci_vmstate = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
void sdhci_common_class_init(ObjectClass *klass, void *data)
|
void sdhci_common_class_init(ObjectClass *klass, const void *data)
|
||||||
{
|
{
|
||||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||||
|
|
||||||
|
|
|
@ -265,7 +265,7 @@ static void emc141x_initfn(Object *obj)
|
||||||
emc141x_set_temperature, NULL, NULL);
|
emc141x_set_temperature, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void emc141x_class_init(ObjectClass *klass, void *data)
|
static void emc141x_class_init(ObjectClass *klass, const void *data)
|
||||||
{
|
{
|
||||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||||
I2CSlaveClass *k = I2C_SLAVE_CLASS(klass);
|
I2CSlaveClass *k = I2C_SLAVE_CLASS(klass);
|
||||||
|
|
|
@ -233,7 +233,7 @@ static void raa228000_init(Object *obj)
|
||||||
isl_pmbus_vr_add_props(obj, flags, 1);
|
isl_pmbus_vr_add_props(obj, flags, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void isl_pmbus_vr_class_init(ObjectClass *klass, void *data,
|
static void isl_pmbus_vr_class_init(ObjectClass *klass, const void *data,
|
||||||
uint8_t pages)
|
uint8_t pages)
|
||||||
{
|
{
|
||||||
PMBusDeviceClass *k = PMBUS_DEVICE_CLASS(klass);
|
PMBusDeviceClass *k = PMBUS_DEVICE_CLASS(klass);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue