aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_drm2/ecore_drm2_device.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-07-21 16:36:06 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-07-21 16:46:00 -0500
commit57e826db69bc02ab6b779a5d65b278f0288bf718 (patch)
treedb27ea4b307edaa09e60eb4acf72c47d2aa55501 /src/lib/ecore_drm2/ecore_drm2_device.c
parenthover: Return valid slot for main_menu_submenu (diff)
downloadefl-57e826db69bc02ab6b779a5d65b278f0288bf718.tar.gz
ecore_drm2: Open elput manager before drm device
We're going to need to access the device as part of the find process, so we need a manager.
Diffstat (limited to 'src/lib/ecore_drm2/ecore_drm2_device.c')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_device.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c b/src/lib/ecore_drm2/ecore_drm2_device.c
index bc3eca0d0d..5552eebd47 100644
--- a/src/lib/ecore_drm2/ecore_drm2_device.c
+++ b/src/lib/ecore_drm2/ecore_drm2_device.c
@@ -570,13 +570,6 @@ ecore_drm2_device_find(const char *seat, unsigned int tty)
dev = calloc(1, sizeof(Ecore_Drm2_Device));
if (!dev) return NULL;
- dev->path = _drm2_device_find(seat);
- if (!dev->path)
- {
- ERR("Could not find drm device on seat %s", seat);
- goto path_err;
- }
-
dev->em = elput_manager_connect(seat, tty);
if (!dev->em)
{
@@ -584,11 +577,18 @@ ecore_drm2_device_find(const char *seat, unsigned int tty)
goto man_err;
}
+ dev->path = _drm2_device_find(dev->em, seat);
+ if (!dev->path)
+ {
+ ERR("Could not find drm device on seat %s", seat);
+ goto path_err;
+ }
+
return dev;
-man_err:
- eina_stringshare_del(dev->path);
path_err:
+ elput_manager_disconnect(dev->em);
+man_err:
free(dev);
return NULL;
}