aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_drm2/ecore_drm2_device.c
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-05-11 09:45:38 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-05-27 11:57:53 -0400
commit92553e167e6c03611e299f41fe538f8963e45723 (patch)
tree1a2c97cf0a4484324bcdccce0878f06171333546 /src/lib/ecore_drm2/ecore_drm2_device.c
parentecore-drm2: Fix potential invalid access to output current_mode (diff)
downloadefl-92553e167e6c03611e299f41fe538f8963e45723.tar.gz
ecore-drm2: Initialize elput input when device gets opened
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Diffstat (limited to 'src/lib/ecore_drm2/ecore_drm2_device.c')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_device.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c b/src/lib/ecore_drm2/ecore_drm2_device.c
index ec180adade..530adcf6d9 100644
--- a/src/lib/ecore_drm2/ecore_drm2_device.c
+++ b/src/lib/ecore_drm2/ecore_drm2_device.c
@@ -134,6 +134,12 @@ ecore_drm2_device_open(Ecore_Drm2_Device *device)
device->fd = elput_manager_open(device->em, device->path, -1);
+ if (!elput_input_init(device->em, NULL))
+ {
+ ERR("Could not initialize Elput Input");
+ goto err;
+ }
+
DBG("Device Path: %s", device->path);
DBG("Device Fd: %d", device->fd);
@@ -146,6 +152,10 @@ ecore_drm2_device_open(Ecore_Drm2_Device *device)
/* ERR("Could not set Universal Plane support: %m"); */
return device->fd;
+
+err:
+ elput_manager_close(device->em, device->fd);
+ return -1;
}
EAPI void
@@ -154,6 +164,7 @@ ecore_drm2_device_close(Ecore_Drm2_Device *device)
EINA_SAFETY_ON_NULL_RETURN(device);
EINA_SAFETY_ON_TRUE_RETURN(device->fd < 0);
+ elput_input_shutdown(device->em);
elput_manager_close(device->em, device->fd);
}