summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm/ecore_drm.c
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-01-11 22:53:18 +0100
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-01-13 18:51:49 +0100
commit0a2f066c2d299edef7b58cc663c7bd22616b344d (patch)
tree867a693398c173ba628f8e4d84d1e683ea000d2b /src/lib/ecore_drm/ecore_drm.c
parent093846aaea3da28f2227f8c300ee807edd5c1ff4 (diff)
ecore_drm: close all devices in shutdown
Diffstat (limited to 'src/lib/ecore_drm/ecore_drm.c')
-rw-r--r--src/lib/ecore_drm/ecore_drm.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/lib/ecore_drm/ecore_drm.c b/src/lib/ecore_drm/ecore_drm.c
index 07b6a4f9cb..36eff1c7a8 100644
--- a/src/lib/ecore_drm/ecore_drm.c
+++ b/src/lib/ecore_drm/ecore_drm.c
@@ -108,15 +108,18 @@ log_err:
108 108
109/** 109/**
110 * Shutdown the Ecore_Drm library. 110 * Shutdown the Ecore_Drm library.
111 * 111 *
112 * @return The number of times the library has been initialized without 112 * @return The number of times the library has been initialized without
113 * being shutdown. 0 is returned if an error occurs. 113 * being shutdown. 0 is returned if an error occurs.
114 * 114 *
115 * @ingroup Ecore_Drm_Init_Group 115 * @ingroup Ecore_Drm_Init_Group
116 */ 116 */
117EAPI int 117EAPI int
118ecore_drm_shutdown(void) 118ecore_drm_shutdown(void)
119{ 119{
120 Eina_List *lists;
121 Ecore_Drm_Device *dev;
122
120 /* _ecore_drm_init_count should not go below zero. */ 123 /* _ecore_drm_init_count should not go below zero. */
121 if (_ecore_drm_init_count < 1) 124 if (_ecore_drm_init_count < 1)
122 { 125 {
@@ -127,6 +130,13 @@ ecore_drm_shutdown(void)
127 /* if we are still in use, decrement init count and get out */ 130 /* if we are still in use, decrement init count and get out */
128 if (--_ecore_drm_init_count != 0) return _ecore_drm_init_count; 131 if (--_ecore_drm_init_count != 0) return _ecore_drm_init_count;
129 132
133 /* free the list of devices */
134 lists = eina_list_clone(ecore_drm_devices_get());
135 EINA_LIST_FREE(lists, dev)
136 {
137 ecore_drm_device_free(dev);
138 }
139
130 _ecore_drm_inputs_shutdown(); 140 _ecore_drm_inputs_shutdown();
131 141
132 /* close eeze */ 142 /* close eeze */