eeze: Fix issue of eeze_udev_watch_add not getting events for drm
authorChris Michael <cp.michael@samsung.com>
Mon, 23 Mar 2015 16:14:45 +0000 (12:14 -0400)
committerChris Michael <cp.michael@samsung.com>
Mon, 23 Mar 2015 16:14:45 +0000 (12:14 -0400)
Summary: This fixes eeze_udev_watch_add for DRM events, Previously, we
were not getting a watch callback fired due to using the wrong
subsystem device type in
udev_monitor_filter_add_match_subsystem_devtype.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/lib/eeze/eeze_udev_watch.c

index ec26b91..5a477b9 100644 (file)
@@ -239,6 +239,10 @@ _get_syspath_from_watch(void             *data,
         if ((!(test = udev_device_get_subsystem(device)))
             || (strcmp(test, "drm")))
           goto error;
+
+        test = udev_device_get_property_value(device, "HOTPLUG");
+        if ((!test) || (strcmp(test, "1"))) goto error;
+
         break;
 
       case EEZE_UDEV_TYPE_BACKLIGHT:
@@ -334,8 +338,7 @@ eeze_udev_watch_add(Eeze_Udev_Type     type,
         break;
 
       case EEZE_UDEV_TYPE_DRM:
-        udev_monitor_filter_add_match_subsystem_devtype(mon, "drm_minor",
-                                                        NULL);
+        udev_monitor_filter_add_match_subsystem_devtype(mon, "drm", NULL);
         break;
 
       default: