From: Mike Blumenkrantz Date: Thu, 23 Apr 2015 17:11:22 +0000 (-0400) Subject: ecore-drm: restrict output backlight detection to drm device X-Git-Tag: v1.14.0-beta3~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4d9b5b8f195d5f738a603142671497b1cd3722ab;p=platform%2Fupstream%2Fefl.git ecore-drm: restrict output backlight detection to drm device previously this would pull in any available backlight device regardless of whether it was actually attached to the device or output in any way --- diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c index c07efc6037..75b9fcc85d 100644 --- a/src/lib/ecore_drm/ecore_drm_output.c +++ b/src/lib/ecore_drm/ecore_drm_output.c @@ -327,7 +327,7 @@ _ecore_drm_output_brightness_set(Ecore_Drm_Backlight *backlight, double brightne */ static Ecore_Drm_Backlight * -_ecore_drm_output_backlight_init(Ecore_Drm_Output *output EINA_UNUSED, uint32_t conn_type) +_ecore_drm_output_backlight_init(Ecore_Drm_Output *output, uint32_t conn_type) { Ecore_Drm_Backlight *backlight = NULL; Ecore_Drm_Backlight_Type type = 0; @@ -342,6 +342,8 @@ _ecore_drm_output_backlight_init(Ecore_Drm_Output *output EINA_UNUSED, uint32_t 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;