diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/video/aty/aty128fb.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/video/aty/aty128fb.c')
-rw-r--r-- | drivers/video/aty/aty128fb.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c index e4e4d433b007..34a0851bcbfa 100644 --- a/drivers/video/aty/aty128fb.c +++ b/drivers/video/aty/aty128fb.c | |||
@@ -52,7 +52,6 @@ | |||
52 | #include <linux/errno.h> | 52 | #include <linux/errno.h> |
53 | #include <linux/string.h> | 53 | #include <linux/string.h> |
54 | #include <linux/mm.h> | 54 | #include <linux/mm.h> |
55 | #include <linux/slab.h> | ||
56 | #include <linux/vmalloc.h> | 55 | #include <linux/vmalloc.h> |
57 | #include <linux/delay.h> | 56 | #include <linux/delay.h> |
58 | #include <linux/interrupt.h> | 57 | #include <linux/interrupt.h> |
@@ -1802,6 +1801,7 @@ static void aty128_bl_set_power(struct fb_info *info, int power) | |||
1802 | 1801 | ||
1803 | static void aty128_bl_init(struct aty128fb_par *par) | 1802 | static void aty128_bl_init(struct aty128fb_par *par) |
1804 | { | 1803 | { |
1804 | struct backlight_properties props; | ||
1805 | struct fb_info *info = pci_get_drvdata(par->pdev); | 1805 | struct fb_info *info = pci_get_drvdata(par->pdev); |
1806 | struct backlight_device *bd; | 1806 | struct backlight_device *bd; |
1807 | char name[12]; | 1807 | char name[12]; |
@@ -1817,7 +1817,10 @@ static void aty128_bl_init(struct aty128fb_par *par) | |||
1817 | 1817 | ||
1818 | snprintf(name, sizeof(name), "aty128bl%d", info->node); | 1818 | snprintf(name, sizeof(name), "aty128bl%d", info->node); |
1819 | 1819 | ||
1820 | bd = backlight_device_register(name, info->dev, par, &aty128_bl_data); | 1820 | memset(&props, 0, sizeof(struct backlight_properties)); |
1821 | props.max_brightness = FB_BACKLIGHT_LEVELS - 1; | ||
1822 | bd = backlight_device_register(name, info->dev, par, &aty128_bl_data, | ||
1823 | &props); | ||
1821 | if (IS_ERR(bd)) { | 1824 | if (IS_ERR(bd)) { |
1822 | info->bl_dev = NULL; | 1825 | info->bl_dev = NULL; |
1823 | printk(KERN_WARNING "aty128: Backlight registration failed\n"); | 1826 | printk(KERN_WARNING "aty128: Backlight registration failed\n"); |
@@ -1829,7 +1832,6 @@ static void aty128_bl_init(struct aty128fb_par *par) | |||
1829 | 63 * FB_BACKLIGHT_MAX / MAX_LEVEL, | 1832 | 63 * FB_BACKLIGHT_MAX / MAX_LEVEL, |
1830 | 219 * FB_BACKLIGHT_MAX / MAX_LEVEL); | 1833 | 219 * FB_BACKLIGHT_MAX / MAX_LEVEL); |
1831 | 1834 | ||
1832 | bd->props.max_brightness = FB_BACKLIGHT_LEVELS - 1; | ||
1833 | bd->props.brightness = bd->props.max_brightness; | 1835 | bd->props.brightness = bd->props.max_brightness; |
1834 | bd->props.power = FB_BLANK_UNBLANK; | 1836 | bd->props.power = FB_BLANK_UNBLANK; |
1835 | backlight_update_status(bd); | 1837 | backlight_update_status(bd); |
@@ -1931,22 +1933,22 @@ static int __devinit aty128_init(struct pci_dev *pdev, const struct pci_device_i | |||
1931 | * PowerMac2,2 summer 2000 iMacs | 1933 | * PowerMac2,2 summer 2000 iMacs |
1932 | * PowerMac4,1 january 2001 iMacs "flower power" | 1934 | * PowerMac4,1 january 2001 iMacs "flower power" |
1933 | */ | 1935 | */ |
1934 | if (machine_is_compatible("PowerMac2,1") || | 1936 | if (of_machine_is_compatible("PowerMac2,1") || |
1935 | machine_is_compatible("PowerMac2,2") || | 1937 | of_machine_is_compatible("PowerMac2,2") || |
1936 | machine_is_compatible("PowerMac4,1")) | 1938 | of_machine_is_compatible("PowerMac4,1")) |
1937 | default_vmode = VMODE_1024_768_75; | 1939 | default_vmode = VMODE_1024_768_75; |
1938 | 1940 | ||
1939 | /* iBook SE */ | 1941 | /* iBook SE */ |
1940 | if (machine_is_compatible("PowerBook2,2")) | 1942 | if (of_machine_is_compatible("PowerBook2,2")) |
1941 | default_vmode = VMODE_800_600_60; | 1943 | default_vmode = VMODE_800_600_60; |
1942 | 1944 | ||
1943 | /* PowerBook Firewire (Pismo), iBook Dual USB */ | 1945 | /* PowerBook Firewire (Pismo), iBook Dual USB */ |
1944 | if (machine_is_compatible("PowerBook3,1") || | 1946 | if (of_machine_is_compatible("PowerBook3,1") || |
1945 | machine_is_compatible("PowerBook4,1")) | 1947 | of_machine_is_compatible("PowerBook4,1")) |
1946 | default_vmode = VMODE_1024_768_60; | 1948 | default_vmode = VMODE_1024_768_60; |
1947 | 1949 | ||
1948 | /* PowerBook Titanium */ | 1950 | /* PowerBook Titanium */ |
1949 | if (machine_is_compatible("PowerBook3,2")) | 1951 | if (of_machine_is_compatible("PowerBook3,2")) |
1950 | default_vmode = VMODE_1152_768_60; | 1952 | default_vmode = VMODE_1152_768_60; |
1951 | 1953 | ||
1952 | if (default_cmode > 16) | 1954 | if (default_cmode > 16) |