aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Bellows <greg.bellows@linaro.org>2014-11-12 12:53:32 -0600
committerAlex Bennée <alex.bennee@linaro.org>2015-01-07 11:36:05 +0000
commit5c393ea8ec91afe8065e99ea36904f74019f589d (patch)
tree08fde50301bc79dce92d4264311732c5f3991b3f
parentcef4b318493bfff8ab4cfa4633b93d3982c97ea7 (diff)
downloadqemu-android-5c393ea8ec91afe8065e99ea36904f74019f589d.tar.gz
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>
-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 8a6f5aa7ff..b620b6589d 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 = g_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.