From e6ed330dceba8ab96e2f406ad67a5ce019cb445f Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 23 Apr 2015 13:17:25 -0400 Subject: [PATCH] ecore-drm: use eeze_udev_find_by_filter() to only return relevant backlight devices --- src/lib/ecore_drm/ecore_drm_output.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c index 75b9fcc85d..9699e9803b 100644 --- a/src/lib/ecore_drm/ecore_drm_output.c +++ b/src/lib/ecore_drm/ecore_drm_output.c @@ -335,15 +335,13 @@ _ecore_drm_output_backlight_init(Ecore_Drm_Output *output, uint32_t conn_type) Eina_Bool found = EINA_FALSE; const char *device, *devtype; - if (!(devs = eeze_udev_find_by_type(EEZE_UDEV_TYPE_BACKLIGHT, NULL))) - devs = eeze_udev_find_by_type(EEZE_UDEV_TYPE_LEDS, NULL); + if (!(devs = eeze_udev_find_by_filter("backlight", NULL, output->dev->drm.path))) + devs = eeze_udev_find_by_filter("leds", NULL, output->dev->drm.path); if (!devs) return NULL; EINA_LIST_FOREACH(devs, l, device) { - /* ensure this backlight is owned by this output's device */ - if (strncmp(device, output->dev->drm.path, strlen(output->dev->drm.path))) continue; if (!(devtype = eeze_udev_syspath_get_sysattr(device, "type"))) continue;