qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] hw: edu: set category of the edu device


From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH] hw: edu: set category of the edu device
Date: Thu, 24 Jan 2019 15:49:42 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 2019-01-24 15:46, kumar sourav wrote:
> Sets the category of edu device as DEVICE_CATEGORY_MISC.
> Devices should be assigned to one of DEVICE_CATEGORY_XXXX.
> 
> Signed-off-by: kumar sourav <address@hidden>
> ---
>  hw/misc/edu.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/hw/misc/edu.c b/hw/misc/edu.c
> index ceaf688bfb..91af452c9e 100644
> --- a/hw/misc/edu.c
> +++ b/hw/misc/edu.c
> @@ -399,6 +399,7 @@ static void edu_instance_init(Object *obj)
>  
>  static void edu_class_init(ObjectClass *class, void *data)
>  {
> +    DeviceClass *dc = DEVICE_CLASS(class);
>      PCIDeviceClass *k = PCI_DEVICE_CLASS(class);
>  
>      k->realize = pci_edu_realize;
> @@ -407,6 +408,7 @@ static void edu_class_init(ObjectClass *class, void *data)
>      k->device_id = 0x11e8;
>      k->revision = 0x10;
>      k->class_id = PCI_CLASS_OTHERS;
> +    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
>  }
>  
>  static void pci_edu_register_types(void)
> 

Looks fine.

Reviewed-by: Thomas Huth <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]