summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorGreg Bellows <greg.bellows@linaro.org>2014-11-12 12:53:32 -0600
committerGreg Bellows <greg.bellows@linaro.org>2014-11-19 17:06:46 -0600
commitc627fc363bfb16c9e212ad4123c6e93f83a67588 (patch)
tree1c4d0ab034e856944e5c45836caf146376956c58 /hw
parent78d80838581b5774b8a503a91c8c7a130814509b (diff)
android-console: Init the event device ID field
Initializes the Goldfish event device ID field so that it is discoverable by name (ID) when needed by the event commands. Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/input/goldfish_events.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/input/goldfish_events.c b/hw/input/goldfish_events.c
index 8a6f5aa7f..3fee6761a 100644
--- a/hw/input/goldfish_events.c
+++ b/hw/input/goldfish_events.c
@@ -535,6 +535,11 @@ static void gf_evdev_realize(DeviceState *dev, Error **errp)
{
GoldfishEvDevState *s = GOLDFISHEVDEV(dev);
+ /* Initialize the device ID so the event dev can be looked up duringi
+ * monitor commands.
+ */
+ dev->id = strdup(TYPE_GOLDFISHEVDEV);
+
/* now set the events capability bits depending on hardware configuration */
/* apparently, the EV_SYN array is used to indicate which other
* event classes to consider.