hw/input/adb.c: set device category of adb
PATCH 1/1 hw/input/adb.c: set device category of adb
Sets the category of adb as DEVICE_CATEGORY_INPUT Devices should be assigned to one of DEVICE_CATEGORY_XXXX
--- hw/input/adb.c | 1 + 1 file changed, 1 insertion(+)
hw/input/adb.c +1 -0
@@ -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); }static const TypeInfo adb_device_type_info = {
Signature · 1 line
2.17.1
David Gibson
AppliedQuoted 4 lines · kumar sourav
Sets the category of adb as
DEVICE_CATEGORY_INPUTDevices should be assigned to one ofDEVICE_CATEGORY_XXXXSigned-off-by kumar sourav <[email protected]>
Applied, thanks.
Quoted 16 lines
--- hw/input/adb.c | 1 + 1 file changed, 1 insertion(+)hw/input/adb.c +1
-0@@ -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); }static const TypeInfo adb_device_type_info = {
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 13 lines · kumar sourav
Sets the category of adb as
DEVICE_CATEGORY_INPUTDevices should be assigned to one ofDEVICE_CATEGORY_XXXXSigned-off-by kumar sourav <[email protected]>--- hw/input/adb.c | 1 + 1 file changed, 1 insertion(+)hw/input/adb.c +0
-0
hw/input/adb.c static void adb_device_class_init(ObjectClass *oc, void *data) · line 130
Quoted 5 lines
hw/input/adb.c +1
-0@@ -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
Quoted 27 lines · Thomas Huth
Quoted 13 lines · kumar sourav
Sets the category of adb as
DEVICE_CATEGORY_INPUTDevices should be assigned to one ofDEVICE_CATEGORY_XXXXSigned-off-by kumar sourav <[email protected]>--- hw/input/adb.c | 1 + 1 file changed, 1 insertion(+)hw/input/adb.c +0
-0hw/input/adb.c static void adb_device_class_init(ObjectClass *oc, void *data) · line 130
Quoted 5 lines
hw/input/adb.c +1
-0@@ -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_DEVICEis 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_INPUTin their own, so they are already fine.
Quoted 7 lines
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_INPUTin the adb-kdb and adb-mouse child classes.
Ah, good point. Dropped from ppc-for-4.0.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson