From 47dfd350fbf80bdfc7dcc102974fad328bf3e993 Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Sat, 25 Jan 2025 14:36:42 +0100 Subject: hw/sysbus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some TYPE_SYS_BUS_DEVICEs can be optionally dynamically plugged on the TYPE_PLATFORM_BUS_DEVICE. Rather than sometimes noting that with comment around the 'user_creatable = true' line in each DeviceRealize handler, introduce an abstract TYPE_DYNAMIC_SYS_BUS_DEVICE class. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alexander Graf Reviewed-by: Clément Mathieu--Drif Message-Id: <20250125181343.59151-4-philmd@linaro.org> --- include/hw/sysbus.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/hw/sysbus.h b/include/hw/sysbus.h index c9b1e0e90e..81bbda10d3 100644 --- a/include/hw/sysbus.h +++ b/include/hw/sysbus.h @@ -19,6 +19,8 @@ DECLARE_INSTANCE_CHECKER(BusState, SYSTEM_BUS, OBJECT_DECLARE_TYPE(SysBusDevice, SysBusDeviceClass, SYS_BUS_DEVICE) +#define TYPE_DYNAMIC_SYS_BUS_DEVICE "dynamic-sysbus-device" + /** * SysBusDeviceClass: * -- cgit 1.4.1