[PATCH v2 05/13] vt82c686: Set user_creatable=false for VT82C686B_PM

BALATON Zoltan posted 13 patches 5 years, 1 month ago
Maintainers: Huacai Chen <chenhuacai@kernel.org>, Aurelien Jarno <aurelien@aurel32.net>, Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>, Jiaxun Yang <jiaxun.yang@flygoat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>
[PATCH v2 05/13] vt82c686: Set user_creatable=false for VT82C686B_PM
Posted by BALATON Zoltan 5 years, 1 month ago
This device is part of the multifunction VIA superio/south bridge chip
so not useful in itself.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
 hw/isa/vt82c686.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
index fc2a1f4430..9b16660e9d 100644
--- a/hw/isa/vt82c686.c
+++ b/hw/isa/vt82c686.c
@@ -200,8 +200,9 @@ static void via_pm_class_init(ObjectClass *klass, void *data)
     k->revision = 0x40;
     dc->reset = vt82c686b_pm_reset;
     dc->desc = "PM";
+    /* Reason: part of VIA south bridge, does not exist stand alone */
+    dc->user_creatable = false;
     dc->vmsd = &vmstate_acpi;
-    set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
 }
 
 static const TypeInfo via_pm_info = {
-- 
2.21.3


Re: [PATCH v2 05/13] vt82c686: Set user_creatable=false for VT82C686B_PM
Posted by Philippe Mathieu-Daudé 5 years ago
On 1/9/21 9:16 PM, BALATON Zoltan wrote:
> This device is part of the multifunction VIA superio/south bridge chip
> so not useful in itself.
> 
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> ---
>  hw/isa/vt82c686.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Re: [PATCH v2 05/13] vt82c686: Set user_creatable=false for VT82C686B_PM
Posted by Jiaxun Yang 5 years ago
在 2021/1/10 上午4:16, BALATON Zoltan 写道:
> This device is part of the multifunction VIA superio/south bridge chip
> so not useful in itself.
>
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> ---
>   hw/isa/vt82c686.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
> index fc2a1f4430..9b16660e9d 100644
> --- a/hw/isa/vt82c686.c
> +++ b/hw/isa/vt82c686.c
> @@ -200,8 +200,9 @@ static void via_pm_class_init(ObjectClass *klass, void *data)
>       k->revision = 0x40;
>       dc->reset = vt82c686b_pm_reset;
>       dc->desc = "PM";
> +    /* Reason: part of VIA south bridge, does not exist stand alone */
> +    dc->user_creatable = false;
>       dc->vmsd = &vmstate_acpi;
> -    set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
>   }
>   
>   static const TypeInfo via_pm_info = {