diff mbox series

[PATCH-for-10.0,02/12] hw/block/m25p80: Categorize and add description

Message ID 20250325224310.8785-3-philmd@linaro.org
State New
Headers show
Series hw: Categorize few devices and add their descriptions | expand

Commit Message

Philippe Mathieu-Daudé March 25, 2025, 10:43 p.m. UTC
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/block/m25p80.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Thomas Huth March 26, 2025, 6:59 a.m. UTC | #1
On 25/03/2025 23.43, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   hw/block/m25p80.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c
> index b84c6afb327..0887c103e4f 100644
> --- a/hw/block/m25p80.c
> +++ b/hw/block/m25p80.c
> @@ -1870,7 +1870,9 @@ static void m25p80_class_init(ObjectClass *klass, void *data)
>       dc->vmsd = &vmstate_m25p80;
>       device_class_set_props(dc, m25p80_properties);
>       device_class_set_legacy_reset(dc, m25p80_reset);
> +    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
>       mc->pi = data;
> +    dc->desc = "Serial Flash";
>   }
>   
>   static const TypeInfo m25p80_info = {

Reviewed-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c
index b84c6afb327..0887c103e4f 100644
--- a/hw/block/m25p80.c
+++ b/hw/block/m25p80.c
@@ -1870,7 +1870,9 @@  static void m25p80_class_init(ObjectClass *klass, void *data)
     dc->vmsd = &vmstate_m25p80;
     device_class_set_props(dc, m25p80_properties);
     device_class_set_legacy_reset(dc, m25p80_reset);
+    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
     mc->pi = data;
+    dc->desc = "Serial Flash";
 }
 
 static const TypeInfo m25p80_info = {