diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2017-07-21 16:36:06 -0500 |
---|---|---|
committer | Derek Foreman <derekf@osg.samsung.com> | 2017-07-21 16:46:00 -0500 |
commit | 57e826db69bc02ab6b779a5d65b278f0288bf718 (patch) | |
tree | db27ea4b307edaa09e60eb4acf72c47d2aa55501 | |
parent | dcf751bd3d79aed31470b2147c95a5f53663e7de (diff) | |
download | efl-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.
-rw-r--r-- | src/lib/ecore_drm2/ecore_drm2_device.c | 18 |
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; } |