qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [Qemu-ppc] [PATCH] hw/input/adb.c: set device categor


From: Thomas Huth
Subject: Re: [Qemu-trivial] [Qemu-ppc] [PATCH] hw/input/adb.c: set device category of adb
Date: Mon, 28 Jan 2019 10:06:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 2019-01-27 11:02, kumar sourav wrote:
> Sets the category of adb as DEVICE_CATEGORY_INPUT
> Devices should be assigned to one of DEVICE_CATEGORY_XXXX
> 
> Signed-off-by: kumar sourav <address@hidden>
> ---
>  hw/input/adb.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/input/adb.c b/hw/input/adb.c
> index bbb40aeef1..6ca7c5641c 100644
> --- a/hw/input/adb.c
> +++ b/hw/input/adb.c
> @@ -126,6 +126,7 @@ static void adb_device_class_init(ObjectClass *oc, void 
> *data)
>      dc->realize = adb_device_realizefn;
>      dc->props = adb_device_properties;
>      dc->bus_type = TYPE_ADB_BUS;
> +    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
>  }

This patch does not make too much sense in its current shape:
TYPE_ADB_DEVICE is an abstract device and does not show up in the output
of "-device help", so it is not necessary for this device itself.

Looking at the "child" devices adb-kdb and adb-mouse, they bother
already set DEVICE_CATEGORY_INPUT in their own, so they are already fine.

Thus please do one of the following:

1) Simply drop this patch.

2) Keep setting the category here in the abstract parent class, but then
also remove the DEVICE_CATEGORY_INPUT in the adb-kdb and adb-mouse child
classes.

 Thomas



reply via email to

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