summaryrefslogtreecommitdiff
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
parentdcf751bd3d79aed31470b2147c95a5f53663e7de (diff)
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)
570 dev = calloc(1, sizeof(Ecore_Drm2_Device)); 570 dev = calloc(1, sizeof(Ecore_Drm2_Device));
571 if (!dev) return NULL; 571 if (!dev) return NULL;
572 572
573 dev->path = _drm2_device_find(seat);
574 if (!dev->path)
575 {
576 ERR("Could not find drm device on seat %s", seat);
577 goto path_err;
578 }
579
580 dev->em = elput_manager_connect(seat, tty); 573 dev->em = elput_manager_connect(seat, tty);
581 if (!dev->em) 574 if (!dev->em)
582 { 575 {
@@ -584,11 +577,18 @@ ecore_drm2_device_find(const char *seat, unsigned int tty)
584 goto man_err; 577 goto man_err;
585 } 578 }
586 579
580 dev->path = _drm2_device_find(dev->em, seat);
581 if (!dev->path)
582 {
583 ERR("Could not find drm device on seat %s", seat);
584 goto path_err;
585 }
586
587 return dev; 587 return dev;
588 588
589man_err:
590 eina_stringshare_del(dev->path);
591path_err: 589path_err:
590 elput_manager_disconnect(dev->em);
591man_err:
592 free(dev); 592 free(dev);
593 return NULL; 593 return NULL;
594} 594}