diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2012-10-17 17:20:24 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2012-10-23 10:23:50 -0400 |
commit | 614499b4d844dcceae5ae2f1e53a2963789a8933 (patch) | |
tree | 518ab7c2080d48229d0ebbd8cb378393ff9d4d8f /drivers/gpu/drm/radeon/radeon_legacy_encoders.c | |
parent | 1518d7fb5d42aec6ec7349b3be8712af132b46fa (diff) | |
download | blackbird-op-linux-614499b4d844dcceae5ae2f1e53a2963789a8933.tar.gz blackbird-op-linux-614499b4d844dcceae5ae2f1e53a2963789a8933.zip |
drm/radeon: give each backlight a unique id
In cases where we have multiple radeons with backlight controls.
Should fix:
https://bugzilla.kernel.org/show_bug.cgi?id=48941
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_legacy_encoders.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c index a13ad9d707cf..0063df9d166d 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c @@ -370,6 +370,7 @@ void radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder, struct backlight_properties props; struct radeon_backlight_privdata *pdata; uint8_t backlight_level; + char bl_name[16]; if (!radeon_encoder->enc_priv) return; @@ -389,7 +390,9 @@ void radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder, memset(&props, 0, sizeof(props)); props.max_brightness = RADEON_MAX_BL_LEVEL; props.type = BACKLIGHT_RAW; - bd = backlight_device_register("radeon_bl", &drm_connector->kdev, + snprintf(bl_name, sizeof(bl_name), + "radeon_bl%d", dev->primary->index); + bd = backlight_device_register(bl_name, &drm_connector->kdev, pdata, &radeon_backlight_ops, &props); if (IS_ERR(bd)) { DRM_ERROR("Backlight registration failed\n"); |