diff options
Diffstat (limited to 'drivers/video/aty/radeon_backlight.c')
-rw-r--r-- | drivers/video/aty/radeon_backlight.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/aty/radeon_backlight.c b/drivers/video/aty/radeon_backlight.c index fa1198c4ccc5..9fc8c66be3ce 100644 --- a/drivers/video/aty/radeon_backlight.c +++ b/drivers/video/aty/radeon_backlight.c | |||
@@ -134,6 +134,7 @@ static struct backlight_ops radeon_bl_data = { | |||
134 | 134 | ||
135 | void radeonfb_bl_init(struct radeonfb_info *rinfo) | 135 | void radeonfb_bl_init(struct radeonfb_info *rinfo) |
136 | { | 136 | { |
137 | struct backlight_properties props; | ||
137 | struct backlight_device *bd; | 138 | struct backlight_device *bd; |
138 | struct radeon_bl_privdata *pdata; | 139 | struct radeon_bl_privdata *pdata; |
139 | char name[12]; | 140 | char name[12]; |
@@ -155,7 +156,10 @@ void radeonfb_bl_init(struct radeonfb_info *rinfo) | |||
155 | 156 | ||
156 | snprintf(name, sizeof(name), "radeonbl%d", rinfo->info->node); | 157 | snprintf(name, sizeof(name), "radeonbl%d", rinfo->info->node); |
157 | 158 | ||
158 | bd = backlight_device_register(name, rinfo->info->dev, pdata, &radeon_bl_data); | 159 | memset(&props, 0, sizeof(struct backlight_properties)); |
160 | props.max_brightness = FB_BACKLIGHT_LEVELS - 1; | ||
161 | bd = backlight_device_register(name, rinfo->info->dev, pdata, | ||
162 | &radeon_bl_data, &props); | ||
159 | if (IS_ERR(bd)) { | 163 | if (IS_ERR(bd)) { |
160 | rinfo->info->bl_dev = NULL; | 164 | rinfo->info->bl_dev = NULL; |
161 | printk("radeonfb: Backlight registration failed\n"); | 165 | printk("radeonfb: Backlight registration failed\n"); |
@@ -185,7 +189,6 @@ void radeonfb_bl_init(struct radeonfb_info *rinfo) | |||
185 | 63 * FB_BACKLIGHT_MAX / MAX_RADEON_LEVEL, | 189 | 63 * FB_BACKLIGHT_MAX / MAX_RADEON_LEVEL, |
186 | 217 * FB_BACKLIGHT_MAX / MAX_RADEON_LEVEL); | 190 | 217 * FB_BACKLIGHT_MAX / MAX_RADEON_LEVEL); |
187 | 191 | ||
188 | bd->props.max_brightness = FB_BACKLIGHT_LEVELS - 1; | ||
189 | bd->props.brightness = bd->props.max_brightness; | 192 | bd->props.brightness = bd->props.max_brightness; |
190 | bd->props.power = FB_BLANK_UNBLANK; | 193 | bd->props.power = FB_BLANK_UNBLANK; |
191 | backlight_update_status(bd); | 194 | backlight_update_status(bd); |