diff options
Diffstat (limited to 'drivers/video/aty/radeon_backlight.c')
-rw-r--r-- | drivers/video/aty/radeon_backlight.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/video/aty/radeon_backlight.c b/drivers/video/aty/radeon_backlight.c index 8c775e6a7e03..0be25fa5540c 100644 --- a/drivers/video/aty/radeon_backlight.c +++ b/drivers/video/aty/radeon_backlight.c | |||
@@ -19,8 +19,6 @@ | |||
19 | 19 | ||
20 | #define MAX_RADEON_LEVEL 0xFF | 20 | #define MAX_RADEON_LEVEL 0xFF |
21 | 21 | ||
22 | static struct backlight_properties radeon_bl_data; | ||
23 | |||
24 | struct radeon_bl_privdata { | 22 | struct radeon_bl_privdata { |
25 | struct radeonfb_info *rinfo; | 23 | struct radeonfb_info *rinfo; |
26 | uint8_t negative; | 24 | uint8_t negative; |
@@ -61,11 +59,11 @@ static int radeon_bl_update_status(struct backlight_device *bd) | |||
61 | * backlight. This provides some greater power saving and the display | 59 | * backlight. This provides some greater power saving and the display |
62 | * is useless without backlight anyway. | 60 | * is useless without backlight anyway. |
63 | */ | 61 | */ |
64 | if (bd->props->power != FB_BLANK_UNBLANK || | 62 | if (bd->props.power != FB_BLANK_UNBLANK || |
65 | bd->props->fb_blank != FB_BLANK_UNBLANK) | 63 | bd->props.fb_blank != FB_BLANK_UNBLANK) |
66 | level = 0; | 64 | level = 0; |
67 | else | 65 | else |
68 | level = bd->props->brightness; | 66 | level = bd->props.brightness; |
69 | 67 | ||
70 | del_timer_sync(&rinfo->lvds_timer); | 68 | del_timer_sync(&rinfo->lvds_timer); |
71 | radeon_engine_idle(); | 69 | radeon_engine_idle(); |
@@ -126,13 +124,12 @@ static int radeon_bl_update_status(struct backlight_device *bd) | |||
126 | 124 | ||
127 | static int radeon_bl_get_brightness(struct backlight_device *bd) | 125 | static int radeon_bl_get_brightness(struct backlight_device *bd) |
128 | { | 126 | { |
129 | return bd->props->brightness; | 127 | return bd->props.brightness; |
130 | } | 128 | } |
131 | 129 | ||
132 | static struct backlight_properties radeon_bl_data = { | 130 | static struct backlight_ops radeon_bl_data = { |
133 | .get_brightness = radeon_bl_get_brightness, | 131 | .get_brightness = radeon_bl_get_brightness, |
134 | .update_status = radeon_bl_update_status, | 132 | .update_status = radeon_bl_update_status, |
135 | .max_brightness = (FB_BACKLIGHT_LEVELS - 1), | ||
136 | }; | 133 | }; |
137 | 134 | ||
138 | void radeonfb_bl_init(struct radeonfb_info *rinfo) | 135 | void radeonfb_bl_init(struct radeonfb_info *rinfo) |
@@ -188,8 +185,9 @@ void radeonfb_bl_init(struct radeonfb_info *rinfo) | |||
188 | 63 * FB_BACKLIGHT_MAX / MAX_RADEON_LEVEL, | 185 | 63 * FB_BACKLIGHT_MAX / MAX_RADEON_LEVEL, |
189 | 217 * FB_BACKLIGHT_MAX / MAX_RADEON_LEVEL); | 186 | 217 * FB_BACKLIGHT_MAX / MAX_RADEON_LEVEL); |
190 | 187 | ||
191 | bd->props->brightness = radeon_bl_data.max_brightness; | 188 | bd->props.max_brightness = FB_BACKLIGHT_LEVELS - 1; |
192 | bd->props->power = FB_BLANK_UNBLANK; | 189 | bd->props.brightness = bd->props.max_brightness; |
190 | bd->props.power = FB_BLANK_UNBLANK; | ||
193 | backlight_update_status(bd); | 191 | backlight_update_status(bd); |
194 | 192 | ||
195 | printk("radeonfb: Backlight initialized (%s)\n", name); | 193 | printk("radeonfb: Backlight initialized (%s)\n", name); |