summaryrefslogtreecommitdiff
path: root/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-08-03 14:56:19 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-08-09 14:56:58 -0500
commitd8a9b895bb3c3e70c4b56441c0c34b981381a8d0 (patch)
tree7d14273fb4af8ab7d53f8369e54fe85a3fac4311 /src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
parent9b9d704292258f1ee1412cc3f2f2ae638bb5237c (diff)
ecore_drm2: Merge ecore_drm2_device_find and ecore_drm2_device_open
There's never a reason to find a device and not open it, so all callers end up calling these two functions back to back.
Diffstat (limited to '')
-rw-r--r--src/modules/ecore_evas/engines/drm/ecore_evas_drm.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
index a801445492..c8714ac1b9 100644
--- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
+++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
@@ -148,15 +148,9 @@ _ecore_evas_drm_init(Ecore_Evas *ee, Ecore_Evas_Engine_Drm_Data *edata, const ch
148 148
149 if (!device) device = "seat0"; 149 if (!device) device = "seat0";
150 150
151 edata->dev = ecore_drm2_device_find(device, 0); 151 edata->dev = ecore_drm2_device_open(device, 0);
152 if (!edata->dev) 152 if (!edata->dev)
153 { 153 {
154 ERR("Failed to create device");
155 goto dev_err;
156 }
157
158 if (ecore_drm2_device_open(edata->dev) < 0)
159 {
160 ERR("Failed to open device"); 154 ERR("Failed to open device");
161 goto open_err; 155 goto open_err;
162 } 156 }
@@ -187,7 +181,6 @@ output_err:
187 ecore_drm2_device_close(edata->dev); 181 ecore_drm2_device_close(edata->dev);
188open_err: 182open_err:
189 ecore_drm2_device_free(edata->dev); 183 ecore_drm2_device_free(edata->dev);
190dev_err:
191 ecore_drm2_shutdown(); 184 ecore_drm2_shutdown();
192init_err: 185init_err:
193 return --_drm_init_count; 186 return --_drm_init_count;