aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/aty/atyfb_base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/aty/atyfb_base.c')
-rw-r--r--drivers/video/aty/atyfb_base.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index 35ba26567598..a7e0062233f2 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -2114,8 +2114,6 @@ static int atyfb_pci_resume(struct pci_dev *pdev)
2114#ifdef CONFIG_FB_ATY_BACKLIGHT 2114#ifdef CONFIG_FB_ATY_BACKLIGHT
2115#define MAX_LEVEL 0xFF 2115#define MAX_LEVEL 0xFF
2116 2116
2117static struct backlight_properties aty_bl_data;
2118
2119static int aty_bl_get_level_brightness(struct atyfb_par *par, int level) 2117static int aty_bl_get_level_brightness(struct atyfb_par *par, int level)
2120{ 2118{
2121 struct fb_info *info = pci_get_drvdata(par->pdev); 2119 struct fb_info *info = pci_get_drvdata(par->pdev);
@@ -2139,11 +2137,11 @@ static int aty_bl_update_status(struct backlight_device *bd)
2139 unsigned int reg = aty_ld_lcd(LCD_MISC_CNTL, par); 2137 unsigned int reg = aty_ld_lcd(LCD_MISC_CNTL, par);
2140 int level; 2138 int level;
2141 2139
2142 if (bd->props->power != FB_BLANK_UNBLANK || 2140 if (bd->props.power != FB_BLANK_UNBLANK ||
2143 bd->props->fb_blank != FB_BLANK_UNBLANK) 2141 bd->props.fb_blank != FB_BLANK_UNBLANK)
2144 level = 0; 2142 level = 0;
2145 else 2143 else
2146 level = bd->props->brightness; 2144 level = bd->props.brightness;
2147 2145
2148 reg |= (BLMOD_EN | BIASMOD_EN); 2146 reg |= (BLMOD_EN | BIASMOD_EN);
2149 if (level > 0) { 2147 if (level > 0) {
@@ -2160,13 +2158,12 @@ static int aty_bl_update_status(struct backlight_device *bd)
2160 2158
2161static int aty_bl_get_brightness(struct backlight_device *bd) 2159static int aty_bl_get_brightness(struct backlight_device *bd)
2162{ 2160{
2163 return bd->props->brightness; 2161 return bd->props.brightness;
2164} 2162}
2165 2163
2166static struct backlight_properties aty_bl_data = { 2164static struct backlight_ops aty_bl_data = {
2167 .get_brightness = aty_bl_get_brightness, 2165 .get_brightness = aty_bl_get_brightness,
2168 .update_status = aty_bl_update_status, 2166 .update_status = aty_bl_update_status,
2169 .max_brightness = (FB_BACKLIGHT_LEVELS - 1),
2170}; 2167};
2171 2168
2172static void aty_bl_init(struct atyfb_par *par) 2169static void aty_bl_init(struct atyfb_par *par)
@@ -2194,8 +2191,9 @@ static void aty_bl_init(struct atyfb_par *par)
2194 0x3F * FB_BACKLIGHT_MAX / MAX_LEVEL, 2191 0x3F * FB_BACKLIGHT_MAX / MAX_LEVEL,
2195 0xFF * FB_BACKLIGHT_MAX / MAX_LEVEL); 2192 0xFF * FB_BACKLIGHT_MAX / MAX_LEVEL);
2196 2193
2197 bd->props->brightness = aty_bl_data.max_brightness; 2194 bd->props.max_brightness = FB_BACKLIGHT_LEVELS - 1;
2198 bd->props->power = FB_BLANK_UNBLANK; 2195 bd->props.brightness = bd->props.max_brightness;
2196 bd->props.power = FB_BLANK_UNBLANK;
2199 backlight_update_status(bd); 2197 backlight_update_status(bd);
2200 2198
2201 printk("aty: Backlight initialized (%s)\n", name); 2199 printk("aty: Backlight initialized (%s)\n", name);