[Intel-gfx] [RFC PATCH 4/5] drm/i915/display: prepend connector name to the backlight

Animesh Manna animesh.manna at intel.com
Thu Jun 2 14:18:49 UTC 2022


From: Arun R Murthy <arun.r.murthy at intel.com>

With the enablement of dual eDP, there will have to exist two entries of
backlight sysfs file. In order to avoid sysfs file name duplication, the
file names are prepended with the connector name.

Signed-off-by: Arun R Murthy <arun.r.murthy at intel.com>
---
 drivers/gpu/drm/i915/display/intel_backlight.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_backlight.c b/drivers/gpu/drm/i915/display/intel_backlight.c
index 68513206a66a..211fa0f07239 100644
--- a/drivers/gpu/drm/i915/display/intel_backlight.c
+++ b/drivers/gpu/drm/i915/display/intel_backlight.c
@@ -967,6 +967,8 @@ int intel_backlight_device_register(struct intel_connector *connector)
 		props.power = FB_BLANK_POWERDOWN;
 
 	name = kstrdup("intel_backlight", GFP_KERNEL);
+	name = kasprintf(GFP_KERNEL, "%s.intel_backlight",
+			connector->base.name);
 	if (!name)
 		return -ENOMEM;
 
-- 
2.29.0



More information about the Intel-gfx mailing list