mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
hw/ppc: Only register spapr_nvdimm_properties if CONFIG_LIBPMEM
Do not register an empty set of properties. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-7-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
c32e946e5a
commit
4ee77e8972
1 changed files with 5 additions and 4 deletions
|
@ -884,22 +884,23 @@ static void spapr_nvdimm_unrealize(NVDIMMDevice *dimm)
|
|||
vmstate_unregister(NULL, &vmstate_spapr_nvdimm_states, dimm);
|
||||
}
|
||||
|
||||
static const Property spapr_nvdimm_properties[] = {
|
||||
#ifdef CONFIG_LIBPMEM
|
||||
static const Property spapr_nvdimm_properties[] = {
|
||||
DEFINE_PROP_BOOL("pmem-override", SpaprNVDIMMDevice, pmem_override, false),
|
||||
#endif
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
#endif
|
||||
|
||||
static void spapr_nvdimm_class_init(ObjectClass *oc, void *data)
|
||||
{
|
||||
DeviceClass *dc = DEVICE_CLASS(oc);
|
||||
NVDIMMClass *nvc = NVDIMM_CLASS(oc);
|
||||
|
||||
nvc->realize = spapr_nvdimm_realize;
|
||||
nvc->unrealize = spapr_nvdimm_unrealize;
|
||||
|
||||
device_class_set_props(dc, spapr_nvdimm_properties);
|
||||
#ifdef CONFIG_LIBPMEM
|
||||
device_class_set_props(DEVICE_CLASS(oc), spapr_nvdimm_properties);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void spapr_nvdimm_init(Object *obj)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue