aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/aty/aty128fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/aty/aty128fb.c')
-rw-r--r--drivers/video/aty/aty128fb.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
index 4de8d6252c3c..8726c3669713 100644
--- a/drivers/video/aty/aty128fb.c
+++ b/drivers/video/aty/aty128fb.c
@@ -1695,8 +1695,6 @@ static int __devinit aty128fb_setup(char *options)
1695#ifdef CONFIG_FB_ATY128_BACKLIGHT 1695#ifdef CONFIG_FB_ATY128_BACKLIGHT
1696#define MAX_LEVEL 0xFF 1696#define MAX_LEVEL 0xFF
1697 1697
1698static struct backlight_properties aty128_bl_data;
1699
1700static int aty128_bl_get_level_brightness(struct aty128fb_par *par, 1698static int aty128_bl_get_level_brightness(struct aty128fb_par *par,
1701 int level) 1699 int level)
1702{ 1700{
@@ -1730,12 +1728,12 @@ static int aty128_bl_update_status(struct backlight_device *bd)
1730 unsigned int reg = aty_ld_le32(LVDS_GEN_CNTL); 1728 unsigned int reg = aty_ld_le32(LVDS_GEN_CNTL);
1731 int level; 1729 int level;
1732 1730
1733 if (bd->props->power != FB_BLANK_UNBLANK || 1731 if (bd->props.power != FB_BLANK_UNBLANK ||
1734 bd->props->fb_blank != FB_BLANK_UNBLANK || 1732 bd->props.fb_blank != FB_BLANK_UNBLANK ||
1735 !par->lcd_on) 1733 !par->lcd_on)
1736 level = 0; 1734 level = 0;
1737 else 1735 else
1738 level = bd->props->brightness; 1736 level = bd->props.brightness;
1739 1737
1740 reg |= LVDS_BL_MOD_EN | LVDS_BLON; 1738 reg |= LVDS_BL_MOD_EN | LVDS_BLON;
1741 if (level > 0) { 1739 if (level > 0) {
@@ -1779,19 +1777,18 @@ static int aty128_bl_update_status(struct backlight_device *bd)
1779 1777
1780static int aty128_bl_get_brightness(struct backlight_device *bd) 1778static int aty128_bl_get_brightness(struct backlight_device *bd)
1781{ 1779{
1782 return bd->props->brightness; 1780 return bd->props.brightness;
1783} 1781}
1784 1782
1785static struct backlight_properties aty128_bl_data = { 1783static struct backlight_ops aty128_bl_data = {
1786 .get_brightness = aty128_bl_get_brightness, 1784 .get_brightness = aty128_bl_get_brightness,
1787 .update_status = aty128_bl_update_status, 1785 .update_status = aty128_bl_update_status,
1788 .max_brightness = (FB_BACKLIGHT_LEVELS - 1),
1789}; 1786};
1790 1787
1791static void aty128_bl_set_power(struct fb_info *info, int power) 1788static void aty128_bl_set_power(struct fb_info *info, int power)
1792{ 1789{
1793 if (info->bl_dev) { 1790 if (info->bl_dev) {
1794 info->bl_dev->props->power = power; 1791 info->bl_dev->props.power = power;
1795 backlight_update_status(info->bl_dev); 1792 backlight_update_status(info->bl_dev);
1796 } 1793 }
1797} 1794}
@@ -1825,8 +1822,9 @@ static void aty128_bl_init(struct aty128fb_par *par)
1825 63 * FB_BACKLIGHT_MAX / MAX_LEVEL, 1822 63 * FB_BACKLIGHT_MAX / MAX_LEVEL,
1826 219 * FB_BACKLIGHT_MAX / MAX_LEVEL); 1823 219 * FB_BACKLIGHT_MAX / MAX_LEVEL);
1827 1824
1828 bd->props->brightness = aty128_bl_data.max_brightness; 1825 bd->props.max_brightness = FB_BACKLIGHT_LEVELS - 1;
1829 bd->props->power = FB_BLANK_UNBLANK; 1826 bd->props.brightness = bd->props.max_brightness;
1827 bd->props.power = FB_BLANK_UNBLANK;
1830 backlight_update_status(bd); 1828 backlight_update_status(bd);
1831 1829
1832 printk("aty128: Backlight initialized (%s)\n", name); 1830 printk("aty128: Backlight initialized (%s)\n", name);