[PATCH v2 3/4] nand: put it into the 'storage' category

Gan Qixin posted 4 patches 5 years ago
Maintainers: Kevin Wolf <kwolf@redhat.com>, Andrzej Zaborowski <balrogg@gmail.com>, Max Reitz <mreitz@redhat.com>, Peter Maydell <peter.maydell@linaro.org>
There is a newer version of this series
[PATCH v2 3/4] nand: put it into the 'storage' category
Posted by Gan Qixin 5 years ago
The category of the nand device is not set, put it into the 'storage'
category.

Signed-off-by: Gan Qixin <ganqixin@huawei.com>
---
 hw/block/nand.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/block/nand.c b/hw/block/nand.c
index bcceb64ebb..1d7a48a2ec 100644
--- a/hw/block/nand.c
+++ b/hw/block/nand.c
@@ -449,6 +449,7 @@ static void nand_class_init(ObjectClass *klass, void *data)
     dc->reset = nand_reset;
     dc->vmsd = &vmstate_nand;
     device_class_set_props(dc, nand_properties);
+    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
 }
 
 static const TypeInfo nand_info = {
-- 
2.23.0


Re: [PATCH v2 3/4] nand: put it into the 'storage' category
Posted by Thomas Huth 5 years ago
On 11/11/2020 17.47, Gan Qixin wrote:
> The category of the nand device is not set, put it into the 'storage'
> category.
> 
> Signed-off-by: Gan Qixin <ganqixin@huawei.com>
> ---
>  hw/block/nand.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/block/nand.c b/hw/block/nand.c
> index bcceb64ebb..1d7a48a2ec 100644
> --- a/hw/block/nand.c
> +++ b/hw/block/nand.c
> @@ -449,6 +449,7 @@ static void nand_class_init(ObjectClass *klass, void *data)
>      dc->reset = nand_reset;
>      dc->vmsd = &vmstate_nand;
>      device_class_set_props(dc, nand_properties);
> +    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
>  }
>  
>  static const TypeInfo nand_info = {
> 

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