Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

OMAP: DSS2: Taal: Use device name in backlight_device_register

Panel Taal driver uses the string "taal" to register for a backlight device.
This causes backlight_device_register() to fail when a second taal panel
is added. Use dev_name(&dssdev->dev) as a parameter instead of the string.

Note: This will break backlight related sysfs commands. Use the name as
generated by the DSS2 driver, in the form "displayi", which represents
the ith registered display device.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

authored by

Archit Taneja and committed by
Tomi Valkeinen
634610ac 5a8b572d

+2 -2
+2 -2
drivers/video/omap2/displays/panel-taal.c
··· 1031 1031 props.max_brightness = 127; 1032 1032 1033 1033 props.type = BACKLIGHT_RAW; 1034 - bldev = backlight_device_register("taal", &dssdev->dev, dssdev, 1035 - &taal_bl_ops, &props); 1034 + bldev = backlight_device_register(dev_name(&dssdev->dev), &dssdev->dev, 1035 + dssdev, &taal_bl_ops, &props); 1036 1036 if (IS_ERR(bldev)) { 1037 1037 r = PTR_ERR(bldev); 1038 1038 goto err_bl;