diff mbox series

[5/9] hw/display: Have RAMFB device inherit from DYNAMIC_SYS_BUS_DEVICE

Message ID 20250125181343.59151-6-philmd@linaro.org (mailing list archive)
State New
Headers show
Series hw/sysbus/platform-bus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE | expand

Commit Message

Philippe Mathieu-Daudé Jan. 25, 2025, 6:13 p.m. UTC
Because the RAM FB device can be optionally plugged on the
TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/display/ramfb-standalone.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Richard Henderson Jan. 26, 2025, 9:53 p.m. UTC | #1
On 1/25/25 10:13, Philippe Mathieu-Daudé wrote:
> Because the RAM FB device can be optionally plugged on the
> TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   hw/display/ramfb-standalone.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
CLEMENT MATHIEU--DRIF Jan. 27, 2025, 6:17 a.m. UTC | #2
Reviewed-by: Clément Mathieu--Drif<clement.mathieu--drif@eviden.com>




On 25/01/2025 19:13, Philippe Mathieu-Daudé wrote:
> Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
>
>
> Because the RAM FB device can be optionally plugged on the
> TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   hw/display/ramfb-standalone.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/hw/display/ramfb-standalone.c b/hw/display/ramfb-standalone.c
> index 6c35028965d..1be106b57f2 100644
> --- a/hw/display/ramfb-standalone.c
> +++ b/hw/display/ramfb-standalone.c
> @@ -72,13 +72,12 @@ static void ramfb_class_initfn(ObjectClass *klass, void *data)
>       dc->vmsd = &ramfb_dev_vmstate;
>       dc->realize = ramfb_realizefn;
>       dc->desc = "ram framebuffer standalone device";
> -    dc->user_creatable = true;
>       device_class_set_props(dc, ramfb_properties);
>   }
>
>   static const TypeInfo ramfb_info = {
>       .name          = TYPE_RAMFB_DEVICE,
> -    .parent        = TYPE_SYS_BUS_DEVICE,
> +    .parent        = TYPE_DYNAMIC_SYS_BUS_DEVICE,
>       .instance_size = sizeof(RAMFBStandaloneState),
>       .class_init    = ramfb_class_initfn,
>   };
> --
> 2.47.1
>
diff mbox series

Patch

diff --git a/hw/display/ramfb-standalone.c b/hw/display/ramfb-standalone.c
index 6c35028965d..1be106b57f2 100644
--- a/hw/display/ramfb-standalone.c
+++ b/hw/display/ramfb-standalone.c
@@ -72,13 +72,12 @@  static void ramfb_class_initfn(ObjectClass *klass, void *data)
     dc->vmsd = &ramfb_dev_vmstate;
     dc->realize = ramfb_realizefn;
     dc->desc = "ram framebuffer standalone device";
-    dc->user_creatable = true;
     device_class_set_props(dc, ramfb_properties);
 }
 
 static const TypeInfo ramfb_info = {
     .name          = TYPE_RAMFB_DEVICE,
-    .parent        = TYPE_SYS_BUS_DEVICE,
+    .parent        = TYPE_DYNAMIC_SYS_BUS_DEVICE,
     .instance_size = sizeof(RAMFBStandaloneState),
     .class_init    = ramfb_class_initfn,
 };