diff options
Diffstat (limited to 'drivers/video')
70 files changed, 140 insertions, 150 deletions
diff --git a/drivers/video/68328fb.c b/drivers/video/68328fb.c index 78488bb41aeb..0dda73da8628 100644 --- a/drivers/video/68328fb.c +++ b/drivers/video/68328fb.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <linux/errno.h> | 32 | #include <linux/errno.h> |
33 | #include <linux/string.h> | 33 | #include <linux/string.h> |
34 | #include <linux/mm.h> | 34 | #include <linux/mm.h> |
35 | #include <linux/tty.h> | ||
36 | #include <linux/slab.h> | 35 | #include <linux/slab.h> |
37 | #include <linux/vmalloc.h> | 36 | #include <linux/vmalloc.h> |
38 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
diff --git a/drivers/video/S3triofb.c b/drivers/video/S3triofb.c index e714e8449c1d..afd146f5f683 100644 --- a/drivers/video/S3triofb.c +++ b/drivers/video/S3triofb.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
29 | #include <linux/string.h> | 29 | #include <linux/string.h> |
30 | #include <linux/mm.h> | 30 | #include <linux/mm.h> |
31 | #include <linux/tty.h> | ||
32 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
33 | #include <linux/vmalloc.h> | 32 | #include <linux/vmalloc.h> |
34 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
diff --git a/drivers/video/amifb.c b/drivers/video/amifb.c index f9bc9f777e75..f1ba54f4fc39 100644 --- a/drivers/video/amifb.c +++ b/drivers/video/amifb.c | |||
@@ -45,7 +45,6 @@ | |||
45 | #include <linux/errno.h> | 45 | #include <linux/errno.h> |
46 | #include <linux/string.h> | 46 | #include <linux/string.h> |
47 | #include <linux/mm.h> | 47 | #include <linux/mm.h> |
48 | #include <linux/tty.h> | ||
49 | #include <linux/slab.h> | 48 | #include <linux/slab.h> |
50 | #include <linux/delay.h> | 49 | #include <linux/delay.h> |
51 | #include <linux/interrupt.h> | 50 | #include <linux/interrupt.h> |
diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c index fd95c2dbd4f7..70dd8115a4d8 100644 --- a/drivers/video/arcfb.c +++ b/drivers/video/arcfb.c | |||
@@ -39,7 +39,6 @@ | |||
39 | #include <linux/errno.h> | 39 | #include <linux/errno.h> |
40 | #include <linux/string.h> | 40 | #include <linux/string.h> |
41 | #include <linux/mm.h> | 41 | #include <linux/mm.h> |
42 | #include <linux/tty.h> | ||
43 | #include <linux/slab.h> | 42 | #include <linux/slab.h> |
44 | #include <linux/vmalloc.h> | 43 | #include <linux/vmalloc.h> |
45 | #include <linux/delay.h> | 44 | #include <linux/delay.h> |
diff --git a/drivers/video/asiliantfb.c b/drivers/video/asiliantfb.c index eaeaf4d1a094..1fd22f460b0f 100644 --- a/drivers/video/asiliantfb.c +++ b/drivers/video/asiliantfb.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
35 | #include <linux/string.h> | 35 | #include <linux/string.h> |
36 | #include <linux/mm.h> | 36 | #include <linux/mm.h> |
37 | #include <linux/tty.h> | ||
38 | #include <linux/slab.h> | 37 | #include <linux/slab.h> |
39 | #include <linux/vmalloc.h> | 38 | #include <linux/vmalloc.h> |
40 | #include <linux/delay.h> | 39 | #include <linux/delay.h> |
diff --git a/drivers/video/atafb.c b/drivers/video/atafb.c index e69ab65f7843..5831893bf7a0 100644 --- a/drivers/video/atafb.c +++ b/drivers/video/atafb.c | |||
@@ -53,7 +53,6 @@ | |||
53 | #include <linux/errno.h> | 53 | #include <linux/errno.h> |
54 | #include <linux/string.h> | 54 | #include <linux/string.h> |
55 | #include <linux/mm.h> | 55 | #include <linux/mm.h> |
56 | #include <linux/tty.h> | ||
57 | #include <linux/slab.h> | 56 | #include <linux/slab.h> |
58 | #include <linux/delay.h> | 57 | #include <linux/delay.h> |
59 | #include <linux/init.h> | 58 | #include <linux/init.h> |
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c index 72c589109471..c64a717e2d4b 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/tty.h> | ||
56 | #include <linux/slab.h> | 55 | #include <linux/slab.h> |
57 | #include <linux/vmalloc.h> | 56 | #include <linux/vmalloc.h> |
58 | #include <linux/delay.h> | 57 | #include <linux/delay.h> |
@@ -456,6 +455,7 @@ static void do_wait_for_fifo(u16 entries, struct aty128fb_par *par); | |||
456 | static void wait_for_fifo(u16 entries, struct aty128fb_par *par); | 455 | static void wait_for_fifo(u16 entries, struct aty128fb_par *par); |
457 | static void wait_for_idle(struct aty128fb_par *par); | 456 | static void wait_for_idle(struct aty128fb_par *par); |
458 | static u32 depth_to_dst(u32 depth); | 457 | static u32 depth_to_dst(u32 depth); |
458 | static void aty128_bl_set_power(struct fb_info *info, int power); | ||
459 | 459 | ||
460 | #define BIOS_IN8(v) (readb(bios + (v))) | 460 | #define BIOS_IN8(v) (readb(bios + (v))) |
461 | #define BIOS_IN16(v) (readb(bios + (v)) | \ | 461 | #define BIOS_IN16(v) (readb(bios + (v)) | \ |
@@ -1258,25 +1258,11 @@ static void aty128_set_lcd_enable(struct aty128fb_par *par, int on) | |||
1258 | reg &= ~LVDS_DISPLAY_DIS; | 1258 | reg &= ~LVDS_DISPLAY_DIS; |
1259 | aty_st_le32(LVDS_GEN_CNTL, reg); | 1259 | aty_st_le32(LVDS_GEN_CNTL, reg); |
1260 | #ifdef CONFIG_FB_ATY128_BACKLIGHT | 1260 | #ifdef CONFIG_FB_ATY128_BACKLIGHT |
1261 | mutex_lock(&info->bl_mutex); | 1261 | aty128_bl_set_power(info, FB_BLANK_UNBLANK); |
1262 | if (info->bl_dev) { | ||
1263 | down(&info->bl_dev->sem); | ||
1264 | info->bl_dev->props->update_status(info->bl_dev); | ||
1265 | up(&info->bl_dev->sem); | ||
1266 | } | ||
1267 | mutex_unlock(&info->bl_mutex); | ||
1268 | #endif | 1262 | #endif |
1269 | } else { | 1263 | } else { |
1270 | #ifdef CONFIG_FB_ATY128_BACKLIGHT | 1264 | #ifdef CONFIG_FB_ATY128_BACKLIGHT |
1271 | mutex_lock(&info->bl_mutex); | 1265 | aty128_bl_set_power(info, FB_BLANK_POWERDOWN); |
1272 | if (info->bl_dev) { | ||
1273 | down(&info->bl_dev->sem); | ||
1274 | info->bl_dev->props->brightness = 0; | ||
1275 | info->bl_dev->props->power = FB_BLANK_POWERDOWN; | ||
1276 | info->bl_dev->props->update_status(info->bl_dev); | ||
1277 | up(&info->bl_dev->sem); | ||
1278 | } | ||
1279 | mutex_unlock(&info->bl_mutex); | ||
1280 | #endif | 1266 | #endif |
1281 | reg = aty_ld_le32(LVDS_GEN_CNTL); | 1267 | reg = aty_ld_le32(LVDS_GEN_CNTL); |
1282 | reg |= LVDS_DISPLAY_DIS; | 1268 | reg |= LVDS_DISPLAY_DIS; |
@@ -1703,6 +1689,7 @@ static int __devinit aty128fb_setup(char *options) | |||
1703 | 1689 | ||
1704 | static struct backlight_properties aty128_bl_data; | 1690 | static struct backlight_properties aty128_bl_data; |
1705 | 1691 | ||
1692 | /* Call with fb_info->bl_mutex held */ | ||
1706 | static int aty128_bl_get_level_brightness(struct aty128fb_par *par, | 1693 | static int aty128_bl_get_level_brightness(struct aty128fb_par *par, |
1707 | int level) | 1694 | int level) |
1708 | { | 1695 | { |
@@ -1710,10 +1697,8 @@ static int aty128_bl_get_level_brightness(struct aty128fb_par *par, | |||
1710 | int atylevel; | 1697 | int atylevel; |
1711 | 1698 | ||
1712 | /* Get and convert the value */ | 1699 | /* Get and convert the value */ |
1713 | mutex_lock(&info->bl_mutex); | ||
1714 | atylevel = MAX_LEVEL - | 1700 | atylevel = MAX_LEVEL - |
1715 | (info->bl_curve[level] * FB_BACKLIGHT_MAX / MAX_LEVEL); | 1701 | (info->bl_curve[level] * FB_BACKLIGHT_MAX / MAX_LEVEL); |
1716 | mutex_unlock(&info->bl_mutex); | ||
1717 | 1702 | ||
1718 | if (atylevel < 0) | 1703 | if (atylevel < 0) |
1719 | atylevel = 0; | 1704 | atylevel = 0; |
@@ -1731,7 +1716,8 @@ static int aty128_bl_get_level_brightness(struct aty128fb_par *par, | |||
1731 | /* That one prevents proper CRT output with LCD off */ | 1716 | /* That one prevents proper CRT output with LCD off */ |
1732 | #undef BACKLIGHT_DAC_OFF | 1717 | #undef BACKLIGHT_DAC_OFF |
1733 | 1718 | ||
1734 | static int aty128_bl_update_status(struct backlight_device *bd) | 1719 | /* Call with fb_info->bl_mutex held */ |
1720 | static int __aty128_bl_update_status(struct backlight_device *bd) | ||
1735 | { | 1721 | { |
1736 | struct aty128fb_par *par = class_get_devdata(&bd->class_dev); | 1722 | struct aty128fb_par *par = class_get_devdata(&bd->class_dev); |
1737 | unsigned int reg = aty_ld_le32(LVDS_GEN_CNTL); | 1723 | unsigned int reg = aty_ld_le32(LVDS_GEN_CNTL); |
@@ -1784,6 +1770,19 @@ static int aty128_bl_update_status(struct backlight_device *bd) | |||
1784 | return 0; | 1770 | return 0; |
1785 | } | 1771 | } |
1786 | 1772 | ||
1773 | static int aty128_bl_update_status(struct backlight_device *bd) | ||
1774 | { | ||
1775 | struct aty128fb_par *par = class_get_devdata(&bd->class_dev); | ||
1776 | struct fb_info *info = pci_get_drvdata(par->pdev); | ||
1777 | int ret; | ||
1778 | |||
1779 | mutex_lock(&info->bl_mutex); | ||
1780 | ret = __aty128_bl_update_status(bd); | ||
1781 | mutex_unlock(&info->bl_mutex); | ||
1782 | |||
1783 | return ret; | ||
1784 | } | ||
1785 | |||
1787 | static int aty128_bl_get_brightness(struct backlight_device *bd) | 1786 | static int aty128_bl_get_brightness(struct backlight_device *bd) |
1788 | { | 1787 | { |
1789 | return bd->props->brightness; | 1788 | return bd->props->brightness; |
@@ -1796,6 +1795,16 @@ static struct backlight_properties aty128_bl_data = { | |||
1796 | .max_brightness = (FB_BACKLIGHT_LEVELS - 1), | 1795 | .max_brightness = (FB_BACKLIGHT_LEVELS - 1), |
1797 | }; | 1796 | }; |
1798 | 1797 | ||
1798 | static void aty128_bl_set_power(struct fb_info *info, int power) | ||
1799 | { | ||
1800 | mutex_lock(&info->bl_mutex); | ||
1801 | up(&info->bl_dev->sem); | ||
1802 | info->bl_dev->props->power = power; | ||
1803 | __aty128_bl_update_status(info->bl_dev); | ||
1804 | down(&info->bl_dev->sem); | ||
1805 | mutex_unlock(&info->bl_mutex); | ||
1806 | } | ||
1807 | |||
1799 | static void aty128_bl_init(struct aty128fb_par *par) | 1808 | static void aty128_bl_init(struct aty128fb_par *par) |
1800 | { | 1809 | { |
1801 | struct fb_info *info = pci_get_drvdata(par->pdev); | 1810 | struct fb_info *info = pci_get_drvdata(par->pdev); |
@@ -2198,12 +2207,8 @@ static int aty128fb_blank(int blank, struct fb_info *fb) | |||
2198 | return 0; | 2207 | return 0; |
2199 | 2208 | ||
2200 | #ifdef CONFIG_FB_ATY128_BACKLIGHT | 2209 | #ifdef CONFIG_FB_ATY128_BACKLIGHT |
2201 | if (machine_is(powermac) && blank) { | 2210 | if (machine_is(powermac) && blank) |
2202 | down(&fb->bl_dev->sem); | 2211 | aty128_bl_set_power(fb, FB_BLANK_POWERDOWN); |
2203 | fb->bl_dev->props->power = FB_BLANK_POWERDOWN; | ||
2204 | fb->bl_dev->props->update_status(fb->bl_dev); | ||
2205 | up(&fb->bl_dev->sem); | ||
2206 | } | ||
2207 | #endif | 2212 | #endif |
2208 | 2213 | ||
2209 | if (blank & FB_BLANK_VSYNC_SUSPEND) | 2214 | if (blank & FB_BLANK_VSYNC_SUSPEND) |
@@ -2219,14 +2224,12 @@ static int aty128fb_blank(int blank, struct fb_info *fb) | |||
2219 | aty128_set_crt_enable(par, par->crt_on && !blank); | 2224 | aty128_set_crt_enable(par, par->crt_on && !blank); |
2220 | aty128_set_lcd_enable(par, par->lcd_on && !blank); | 2225 | aty128_set_lcd_enable(par, par->lcd_on && !blank); |
2221 | } | 2226 | } |
2227 | |||
2222 | #ifdef CONFIG_FB_ATY128_BACKLIGHT | 2228 | #ifdef CONFIG_FB_ATY128_BACKLIGHT |
2223 | if (machine_is(powermac) && !blank) { | 2229 | if (machine_is(powermac) && !blank) |
2224 | down(&fb->bl_dev->sem); | 2230 | aty128_bl_set_power(fb, FB_BLANK_UNBLANK); |
2225 | fb->bl_dev->props->power = FB_BLANK_UNBLANK; | ||
2226 | fb->bl_dev->props->update_status(fb->bl_dev); | ||
2227 | up(&fb->bl_dev->sem); | ||
2228 | } | ||
2229 | #endif | 2231 | #endif |
2232 | |||
2230 | return 0; | 2233 | return 0; |
2231 | } | 2234 | } |
2232 | 2235 | ||
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index 0c9706746d79..1507d19f481f 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
@@ -2129,15 +2129,14 @@ static int atyfb_pci_resume(struct pci_dev *pdev) | |||
2129 | 2129 | ||
2130 | static struct backlight_properties aty_bl_data; | 2130 | static struct backlight_properties aty_bl_data; |
2131 | 2131 | ||
2132 | /* Call with fb_info->bl_mutex held */ | ||
2132 | static int aty_bl_get_level_brightness(struct atyfb_par *par, int level) | 2133 | static int aty_bl_get_level_brightness(struct atyfb_par *par, int level) |
2133 | { | 2134 | { |
2134 | struct fb_info *info = pci_get_drvdata(par->pdev); | 2135 | struct fb_info *info = pci_get_drvdata(par->pdev); |
2135 | int atylevel; | 2136 | int atylevel; |
2136 | 2137 | ||
2137 | /* Get and convert the value */ | 2138 | /* Get and convert the value */ |
2138 | mutex_lock(&info->bl_mutex); | ||
2139 | atylevel = info->bl_curve[level] * FB_BACKLIGHT_MAX / MAX_LEVEL; | 2139 | atylevel = info->bl_curve[level] * FB_BACKLIGHT_MAX / MAX_LEVEL; |
2140 | mutex_unlock(&info->bl_mutex); | ||
2141 | 2140 | ||
2142 | if (atylevel < 0) | 2141 | if (atylevel < 0) |
2143 | atylevel = 0; | 2142 | atylevel = 0; |
@@ -2147,7 +2146,8 @@ static int aty_bl_get_level_brightness(struct atyfb_par *par, int level) | |||
2147 | return atylevel; | 2146 | return atylevel; |
2148 | } | 2147 | } |
2149 | 2148 | ||
2150 | static int aty_bl_update_status(struct backlight_device *bd) | 2149 | /* Call with fb_info->bl_mutex held */ |
2150 | static int __aty_bl_update_status(struct backlight_device *bd) | ||
2151 | { | 2151 | { |
2152 | struct atyfb_par *par = class_get_devdata(&bd->class_dev); | 2152 | struct atyfb_par *par = class_get_devdata(&bd->class_dev); |
2153 | unsigned int reg = aty_ld_lcd(LCD_MISC_CNTL, par); | 2153 | unsigned int reg = aty_ld_lcd(LCD_MISC_CNTL, par); |
@@ -2172,6 +2172,19 @@ static int aty_bl_update_status(struct backlight_device *bd) | |||
2172 | return 0; | 2172 | return 0; |
2173 | } | 2173 | } |
2174 | 2174 | ||
2175 | static int aty_bl_update_status(struct backlight_device *bd) | ||
2176 | { | ||
2177 | struct atyfb_par *par = class_get_devdata(&bd->class_dev); | ||
2178 | struct fb_info *info = pci_get_drvdata(par->pdev); | ||
2179 | int ret; | ||
2180 | |||
2181 | mutex_lock(&info->bl_mutex); | ||
2182 | ret = __aty_bl_update_status(bd); | ||
2183 | mutex_unlock(&info->bl_mutex); | ||
2184 | |||
2185 | return ret; | ||
2186 | } | ||
2187 | |||
2175 | static int aty_bl_get_brightness(struct backlight_device *bd) | 2188 | static int aty_bl_get_brightness(struct backlight_device *bd) |
2176 | { | 2189 | { |
2177 | return bd->props->brightness; | 2190 | return bd->props->brightness; |
@@ -2184,6 +2197,16 @@ static struct backlight_properties aty_bl_data = { | |||
2184 | .max_brightness = (FB_BACKLIGHT_LEVELS - 1), | 2197 | .max_brightness = (FB_BACKLIGHT_LEVELS - 1), |
2185 | }; | 2198 | }; |
2186 | 2199 | ||
2200 | static void aty_bl_set_power(struct fb_info *info, int power) | ||
2201 | { | ||
2202 | mutex_lock(&info->bl_mutex); | ||
2203 | up(&info->bl_dev->sem); | ||
2204 | info->bl_dev->props->power = power; | ||
2205 | __aty_bl_update_status(info->bl_dev); | ||
2206 | down(&info->bl_dev->sem); | ||
2207 | mutex_unlock(&info->bl_mutex); | ||
2208 | } | ||
2209 | |||
2187 | static void aty_bl_init(struct atyfb_par *par) | 2210 | static void aty_bl_init(struct atyfb_par *par) |
2188 | { | 2211 | { |
2189 | struct fb_info *info = pci_get_drvdata(par->pdev); | 2212 | struct fb_info *info = pci_get_drvdata(par->pdev); |
@@ -2790,16 +2813,8 @@ static int atyfb_blank(int blank, struct fb_info *info) | |||
2790 | return 0; | 2813 | return 0; |
2791 | 2814 | ||
2792 | #ifdef CONFIG_PMAC_BACKLIGHT | 2815 | #ifdef CONFIG_PMAC_BACKLIGHT |
2793 | if (machine_is(powermac) && blank > FB_BLANK_NORMAL) { | 2816 | if (machine_is(powermac) && blank > FB_BLANK_NORMAL) |
2794 | mutex_lock(&info->bl_mutex); | 2817 | aty_bl_set_power(info, FB_BLANK_POWERDOWN); |
2795 | if (info->bl_dev) { | ||
2796 | down(&info->bl_dev->sem); | ||
2797 | info->bl_dev->props->power = FB_BLANK_POWERDOWN; | ||
2798 | info->bl_dev->props->update_status(info->bl_dev); | ||
2799 | up(&info->bl_dev->sem); | ||
2800 | } | ||
2801 | mutex_unlock(&info->bl_mutex); | ||
2802 | } | ||
2803 | #elif defined(CONFIG_FB_ATY_GENERIC_LCD) | 2818 | #elif defined(CONFIG_FB_ATY_GENERIC_LCD) |
2804 | if (par->lcd_table && blank > FB_BLANK_NORMAL && | 2819 | if (par->lcd_table && blank > FB_BLANK_NORMAL && |
2805 | (aty_ld_lcd(LCD_GEN_CNTL, par) & LCD_ON)) { | 2820 | (aty_ld_lcd(LCD_GEN_CNTL, par) & LCD_ON)) { |
@@ -2830,16 +2845,8 @@ static int atyfb_blank(int blank, struct fb_info *info) | |||
2830 | aty_st_le32(CRTC_GEN_CNTL, gen_cntl, par); | 2845 | aty_st_le32(CRTC_GEN_CNTL, gen_cntl, par); |
2831 | 2846 | ||
2832 | #ifdef CONFIG_PMAC_BACKLIGHT | 2847 | #ifdef CONFIG_PMAC_BACKLIGHT |
2833 | if (machine_is(powermac) && blank <= FB_BLANK_NORMAL) { | 2848 | if (machine_is(powermac) && blank <= FB_BLANK_NORMAL) |
2834 | mutex_lock(&info->bl_mutex); | 2849 | aty_bl_set_power(info, FB_BLANK_UNBLANK); |
2835 | if (info->bl_dev) { | ||
2836 | down(&info->bl_dev->sem); | ||
2837 | info->bl_dev->props->power = FB_BLANK_UNBLANK; | ||
2838 | info->bl_dev->props->update_status(info->bl_dev); | ||
2839 | up(&info->bl_dev->sem); | ||
2840 | } | ||
2841 | mutex_unlock(&info->bl_mutex); | ||
2842 | } | ||
2843 | #elif defined(CONFIG_FB_ATY_GENERIC_LCD) | 2850 | #elif defined(CONFIG_FB_ATY_GENERIC_LCD) |
2844 | if (par->lcd_table && blank <= FB_BLANK_NORMAL && | 2851 | if (par->lcd_table && blank <= FB_BLANK_NORMAL && |
2845 | (aty_ld_lcd(LCD_GEN_CNTL, par) & LCD_ON)) { | 2852 | (aty_ld_lcd(LCD_GEN_CNTL, par) & LCD_ON)) { |
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c index 51b78f8de949..8d85fc58142e 100644 --- a/drivers/video/aty/radeon_base.c +++ b/drivers/video/aty/radeon_base.c | |||
@@ -58,7 +58,6 @@ | |||
58 | #include <linux/errno.h> | 58 | #include <linux/errno.h> |
59 | #include <linux/string.h> | 59 | #include <linux/string.h> |
60 | #include <linux/mm.h> | 60 | #include <linux/mm.h> |
61 | #include <linux/tty.h> | ||
62 | #include <linux/slab.h> | 61 | #include <linux/slab.h> |
63 | #include <linux/delay.h> | 62 | #include <linux/delay.h> |
64 | #include <linux/time.h> | 63 | #include <linux/time.h> |
diff --git a/drivers/video/chipsfb.c b/drivers/video/chipsfb.c index 0e465c80ef24..73cb426bf2d7 100644 --- a/drivers/video/chipsfb.c +++ b/drivers/video/chipsfb.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
20 | #include <linux/string.h> | 20 | #include <linux/string.h> |
21 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
22 | #include <linux/tty.h> | ||
23 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
24 | #include <linux/vmalloc.h> | 23 | #include <linux/vmalloc.h> |
25 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
@@ -150,12 +149,11 @@ static int chipsfb_blank(int blank, struct fb_info *info) | |||
150 | mutex_lock(&pmac_backlight_mutex); | 149 | mutex_lock(&pmac_backlight_mutex); |
151 | 150 | ||
152 | if (pmac_backlight) { | 151 | if (pmac_backlight) { |
153 | down(&pmac_backlight->sem); | ||
154 | |||
155 | /* used to disable backlight only for blank > 1, but it seems | 152 | /* used to disable backlight only for blank > 1, but it seems |
156 | * useful at blank = 1 too (saves battery, extends backlight | 153 | * useful at blank = 1 too (saves battery, extends backlight |
157 | * life) | 154 | * life) |
158 | */ | 155 | */ |
156 | down(&pmac_backlight->sem); | ||
159 | if (blank) | 157 | if (blank) |
160 | pmac_backlight->props->power = FB_BLANK_POWERDOWN; | 158 | pmac_backlight->props->power = FB_BLANK_POWERDOWN; |
161 | else | 159 | else |
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c index 7355da09c721..daf43f535a0b 100644 --- a/drivers/video/cirrusfb.c +++ b/drivers/video/cirrusfb.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <linux/errno.h> | 41 | #include <linux/errno.h> |
42 | #include <linux/string.h> | 42 | #include <linux/string.h> |
43 | #include <linux/mm.h> | 43 | #include <linux/mm.h> |
44 | #include <linux/tty.h> | ||
45 | #include <linux/slab.h> | 44 | #include <linux/slab.h> |
46 | #include <linux/delay.h> | 45 | #include <linux/delay.h> |
47 | #include <linux/fb.h> | 46 | #include <linux/fb.h> |
diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c index 878707a04398..d9315d99445f 100644 --- a/drivers/video/console/dummycon.c +++ b/drivers/video/console/dummycon.c | |||
@@ -7,9 +7,9 @@ | |||
7 | 7 | ||
8 | #include <linux/types.h> | 8 | #include <linux/types.h> |
9 | #include <linux/kdev_t.h> | 9 | #include <linux/kdev_t.h> |
10 | #include <linux/tty.h> | ||
11 | #include <linux/console.h> | 10 | #include <linux/console.h> |
12 | #include <linux/vt_kern.h> | 11 | #include <linux/vt_kern.h> |
12 | #include <linux/screen_info.h> | ||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | 15 | ||
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 94e9f7069bef..390439b3d899 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
@@ -64,7 +64,6 @@ | |||
64 | #include <linux/fs.h> | 64 | #include <linux/fs.h> |
65 | #include <linux/kernel.h> | 65 | #include <linux/kernel.h> |
66 | #include <linux/delay.h> /* MSch: for IRQ probe */ | 66 | #include <linux/delay.h> /* MSch: for IRQ probe */ |
67 | #include <linux/tty.h> | ||
68 | #include <linux/console.h> | 67 | #include <linux/console.h> |
69 | #include <linux/string.h> | 68 | #include <linux/string.h> |
70 | #include <linux/kd.h> | 69 | #include <linux/kd.h> |
diff --git a/drivers/video/console/mdacon.c b/drivers/video/console/mdacon.c index c89f90edf8ac..52ed12b12acc 100644 --- a/drivers/video/console/mdacon.c +++ b/drivers/video/console/mdacon.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/fs.h> | 31 | #include <linux/fs.h> |
32 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/tty.h> | ||
35 | #include <linux/console.h> | 34 | #include <linux/console.h> |
36 | #include <linux/string.h> | 35 | #include <linux/string.h> |
37 | #include <linux/kd.h> | 36 | #include <linux/kd.h> |
diff --git a/drivers/video/console/newport_con.c b/drivers/video/console/newport_con.c index 03041311711b..7fa1afeae8dc 100644 --- a/drivers/video/console/newport_con.c +++ b/drivers/video/console/newport_con.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <linux/tty.h> | ||
16 | #include <linux/kd.h> | 15 | #include <linux/kd.h> |
17 | #include <linux/selection.h> | 16 | #include <linux/selection.h> |
18 | #include <linux/console.h> | 17 | #include <linux/console.h> |
diff --git a/drivers/video/console/promcon.c b/drivers/video/console/promcon.c index 5cd5e114d1e6..b78eac63459f 100644 --- a/drivers/video/console/promcon.c +++ b/drivers/video/console/promcon.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <linux/tty.h> | ||
14 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
15 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
16 | #include <linux/console.h> | 15 | #include <linux/console.h> |
diff --git a/drivers/video/console/softcursor.c b/drivers/video/console/softcursor.c index 3957fc7523e2..557c563e4aed 100644 --- a/drivers/video/console/softcursor.c +++ b/drivers/video/console/softcursor.c | |||
@@ -10,7 +10,6 @@ | |||
10 | 10 | ||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/string.h> | 12 | #include <linux/string.h> |
13 | #include <linux/tty.h> | ||
14 | #include <linux/fb.h> | 13 | #include <linux/fb.h> |
15 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
16 | 15 | ||
diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c index 45c4f227e56e..45586aaabd1e 100644 --- a/drivers/video/console/sticon.c +++ b/drivers/video/console/sticon.c | |||
@@ -37,7 +37,6 @@ | |||
37 | 37 | ||
38 | #include <linux/init.h> | 38 | #include <linux/init.h> |
39 | #include <linux/kernel.h> | 39 | #include <linux/kernel.h> |
40 | #include <linux/tty.h> | ||
41 | #include <linux/console.h> | 40 | #include <linux/console.h> |
42 | #include <linux/errno.h> | 41 | #include <linux/errno.h> |
43 | #include <linux/vt_kern.h> | 42 | #include <linux/vt_kern.h> |
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 05735ff4e9c5..0a2c10a1abf8 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <linux/sched.h> | 38 | #include <linux/sched.h> |
39 | #include <linux/fs.h> | 39 | #include <linux/fs.h> |
40 | #include <linux/kernel.h> | 40 | #include <linux/kernel.h> |
41 | #include <linux/tty.h> | ||
42 | #include <linux/console.h> | 41 | #include <linux/console.h> |
43 | #include <linux/string.h> | 42 | #include <linux/string.h> |
44 | #include <linux/kd.h> | 43 | #include <linux/kd.h> |
@@ -48,6 +47,7 @@ | |||
48 | #include <linux/spinlock.h> | 47 | #include <linux/spinlock.h> |
49 | #include <linux/ioport.h> | 48 | #include <linux/ioport.h> |
50 | #include <linux/init.h> | 49 | #include <linux/init.h> |
50 | #include <linux/screen_info.h> | ||
51 | #include <linux/smp_lock.h> | 51 | #include <linux/smp_lock.h> |
52 | #include <video/vga.h> | 52 | #include <video/vga.h> |
53 | #include <asm/io.h> | 53 | #include <asm/io.h> |
diff --git a/drivers/video/controlfb.c b/drivers/video/controlfb.c index acdd6a103dbb..8cc6c0e2d27a 100644 --- a/drivers/video/controlfb.c +++ b/drivers/video/controlfb.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/errno.h> | 36 | #include <linux/errno.h> |
37 | #include <linux/string.h> | 37 | #include <linux/string.h> |
38 | #include <linux/mm.h> | 38 | #include <linux/mm.h> |
39 | #include <linux/tty.h> | ||
40 | #include <linux/slab.h> | 39 | #include <linux/slab.h> |
41 | #include <linux/vmalloc.h> | 40 | #include <linux/vmalloc.h> |
42 | #include <linux/delay.h> | 41 | #include <linux/delay.h> |
diff --git a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c index 2e2924957d8f..aae6d9c26e88 100644 --- a/drivers/video/cyber2000fb.c +++ b/drivers/video/cyber2000fb.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <linux/errno.h> | 41 | #include <linux/errno.h> |
42 | #include <linux/string.h> | 42 | #include <linux/string.h> |
43 | #include <linux/mm.h> | 43 | #include <linux/mm.h> |
44 | #include <linux/tty.h> | ||
45 | #include <linux/slab.h> | 44 | #include <linux/slab.h> |
46 | #include <linux/delay.h> | 45 | #include <linux/delay.h> |
47 | #include <linux/fb.h> | 46 | #include <linux/fb.h> |
diff --git a/drivers/video/cyberfb.c b/drivers/video/cyberfb.c index a3e189f90a7d..c40e72dafb0e 100644 --- a/drivers/video/cyberfb.c +++ b/drivers/video/cyberfb.c | |||
@@ -81,7 +81,6 @@ | |||
81 | #include <linux/errno.h> | 81 | #include <linux/errno.h> |
82 | #include <linux/string.h> | 82 | #include <linux/string.h> |
83 | #include <linux/mm.h> | 83 | #include <linux/mm.h> |
84 | #include <linux/tty.h> | ||
85 | #include <linux/slab.h> | 84 | #include <linux/slab.h> |
86 | #include <linux/delay.h> | 85 | #include <linux/delay.h> |
87 | #include <linux/zorro.h> | 86 | #include <linux/zorro.h> |
diff --git a/drivers/video/dnfb.c b/drivers/video/dnfb.c index 5abd3cb00671..b083ea7e9c69 100644 --- a/drivers/video/dnfb.c +++ b/drivers/video/dnfb.c | |||
@@ -2,7 +2,6 @@ | |||
2 | #include <linux/errno.h> | 2 | #include <linux/errno.h> |
3 | #include <linux/string.h> | 3 | #include <linux/string.h> |
4 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
5 | #include <linux/tty.h> | ||
6 | #include <linux/slab.h> | 5 | #include <linux/slab.h> |
7 | #include <linux/delay.h> | 6 | #include <linux/delay.h> |
8 | #include <linux/interrupt.h> | 7 | #include <linux/interrupt.h> |
diff --git a/drivers/video/epson1355fb.c b/drivers/video/epson1355fb.c index f0a621ecc288..737257d278f0 100644 --- a/drivers/video/epson1355fb.c +++ b/drivers/video/epson1355fb.c | |||
@@ -48,7 +48,6 @@ | |||
48 | #include <linux/errno.h> | 48 | #include <linux/errno.h> |
49 | #include <linux/string.h> | 49 | #include <linux/string.h> |
50 | #include <linux/mm.h> | 50 | #include <linux/mm.h> |
51 | #include <linux/tty.h> | ||
52 | #include <linux/slab.h> | 51 | #include <linux/slab.h> |
53 | #include <linux/delay.h> | 52 | #include <linux/delay.h> |
54 | #include <linux/fb.h> | 53 | #include <linux/fb.h> |
diff --git a/drivers/video/fbcmap.c b/drivers/video/fbcmap.c index 1f98392a43b3..e8b135f3d80d 100644 --- a/drivers/video/fbcmap.c +++ b/drivers/video/fbcmap.c | |||
@@ -13,7 +13,6 @@ | |||
13 | 13 | ||
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/tty.h> | ||
17 | #include <linux/fb.h> | 16 | #include <linux/fb.h> |
18 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
19 | 18 | ||
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 33034f81114d..4fc9df426c1a 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
25 | #include <linux/mman.h> | 25 | #include <linux/mman.h> |
26 | #include <linux/tty.h> | 26 | #include <linux/vt.h> |
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/linux_logo.h> | 28 | #include <linux/linux_logo.h> |
29 | #include <linux/proc_fs.h> | 29 | #include <linux/proc_fs.h> |
diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c index 3ccfff715a51..de93139ccbb5 100644 --- a/drivers/video/fbmon.c +++ b/drivers/video/fbmon.c | |||
@@ -26,7 +26,6 @@ | |||
26 | * for more details. | 26 | * for more details. |
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | #include <linux/tty.h> | ||
30 | #include <linux/fb.h> | 29 | #include <linux/fb.h> |
31 | #include <linux/module.h> | 30 | #include <linux/module.h> |
32 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
diff --git a/drivers/video/g364fb.c b/drivers/video/g364fb.c index 605d1a132020..1b981b635675 100644 --- a/drivers/video/g364fb.c +++ b/drivers/video/g364fb.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
22 | #include <linux/string.h> | 22 | #include <linux/string.h> |
23 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
24 | #include <linux/tty.h> | ||
25 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
26 | #include <linux/vmalloc.h> | 25 | #include <linux/vmalloc.h> |
27 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
diff --git a/drivers/video/geode/gx1fb_core.c b/drivers/video/geode/gx1fb_core.c index 4d3a8871d3d1..bcf9cea54d8b 100644 --- a/drivers/video/geode/gx1fb_core.c +++ b/drivers/video/geode/gx1fb_core.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/tty.h> | ||
19 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
20 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
21 | #include <linux/fb.h> | 20 | #include <linux/fb.h> |
diff --git a/drivers/video/geode/gxfb_core.c b/drivers/video/geode/gxfb_core.c index 5ef12a3dfa50..0d3643fc6293 100644 --- a/drivers/video/geode/gxfb_core.c +++ b/drivers/video/geode/gxfb_core.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
26 | #include <linux/string.h> | 26 | #include <linux/string.h> |
27 | #include <linux/mm.h> | 27 | #include <linux/mm.h> |
28 | #include <linux/tty.h> | ||
29 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
30 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
31 | #include <linux/fb.h> | 30 | #include <linux/fb.h> |
diff --git a/drivers/video/hgafb.c b/drivers/video/hgafb.c index 4e39035cf335..fb9e67228543 100644 --- a/drivers/video/hgafb.c +++ b/drivers/video/hgafb.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/spinlock.h> | 36 | #include <linux/spinlock.h> |
37 | #include <linux/string.h> | 37 | #include <linux/string.h> |
38 | #include <linux/mm.h> | 38 | #include <linux/mm.h> |
39 | #include <linux/tty.h> | ||
40 | #include <linux/slab.h> | 39 | #include <linux/slab.h> |
41 | #include <linux/delay.h> | 40 | #include <linux/delay.h> |
42 | #include <linux/fb.h> | 41 | #include <linux/fb.h> |
diff --git a/drivers/video/hitfb.c b/drivers/video/hitfb.c index 01864767450d..4cc6b454265e 100644 --- a/drivers/video/hitfb.c +++ b/drivers/video/hitfb.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/string.h> | 18 | #include <linux/string.h> |
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | #include <linux/tty.h> | ||
21 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
22 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
23 | #include <linux/init.h> | 22 | #include <linux/init.h> |
diff --git a/drivers/video/hpfb.c b/drivers/video/hpfb.c index abd920a663a0..91cf3b577d15 100644 --- a/drivers/video/hpfb.c +++ b/drivers/video/hpfb.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
12 | #include <linux/string.h> | 12 | #include <linux/string.h> |
13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
14 | #include <linux/tty.h> | ||
15 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
16 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
17 | #include <linux/init.h> | 16 | #include <linux/init.h> |
diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c index fbe8a2c4b04c..a6ca02f2156a 100644 --- a/drivers/video/i810/i810_main.c +++ b/drivers/video/i810/i810_main.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/errno.h> | 33 | #include <linux/errno.h> |
34 | #include <linux/string.h> | 34 | #include <linux/string.h> |
35 | #include <linux/mm.h> | 35 | #include <linux/mm.h> |
36 | #include <linux/tty.h> | ||
37 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
38 | #include <linux/fb.h> | 37 | #include <linux/fb.h> |
39 | #include <linux/init.h> | 38 | #include <linux/init.h> |
diff --git a/drivers/video/igafb.c b/drivers/video/igafb.c index 8a0c2d3d3805..67f384f86758 100644 --- a/drivers/video/igafb.c +++ b/drivers/video/igafb.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/errno.h> | 33 | #include <linux/errno.h> |
34 | #include <linux/string.h> | 34 | #include <linux/string.h> |
35 | #include <linux/mm.h> | 35 | #include <linux/mm.h> |
36 | #include <linux/tty.h> | ||
37 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
38 | #include <linux/vmalloc.h> | 37 | #include <linux/vmalloc.h> |
39 | #include <linux/delay.h> | 38 | #include <linux/delay.h> |
diff --git a/drivers/video/imacfb.c b/drivers/video/imacfb.c index cdbae173d69a..ff233b84dec4 100644 --- a/drivers/video/imacfb.c +++ b/drivers/video/imacfb.c | |||
@@ -15,9 +15,9 @@ | |||
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/screen_info.h> | ||
18 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
19 | #include <linux/string.h> | 20 | #include <linux/string.h> |
20 | #include <linux/tty.h> | ||
21 | 21 | ||
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | 23 | ||
diff --git a/drivers/video/imsttfb.c b/drivers/video/imsttfb.c index 5f393d985b11..5715b8ad0ddc 100644 --- a/drivers/video/imsttfb.c +++ b/drivers/video/imsttfb.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
22 | #include <linux/string.h> | 22 | #include <linux/string.h> |
23 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
24 | #include <linux/tty.h> | ||
25 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
26 | #include <linux/vmalloc.h> | 25 | #include <linux/vmalloc.h> |
27 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c index 3f39d84015f1..06af89d44a0d 100644 --- a/drivers/video/intelfb/intelfbdrv.c +++ b/drivers/video/intelfb/intelfbdrv.c | |||
@@ -113,7 +113,6 @@ | |||
113 | #include <linux/errno.h> | 113 | #include <linux/errno.h> |
114 | #include <linux/string.h> | 114 | #include <linux/string.h> |
115 | #include <linux/mm.h> | 115 | #include <linux/mm.h> |
116 | #include <linux/tty.h> | ||
117 | #include <linux/slab.h> | 116 | #include <linux/slab.h> |
118 | #include <linux/delay.h> | 117 | #include <linux/delay.h> |
119 | #include <linux/fb.h> | 118 | #include <linux/fb.h> |
@@ -122,6 +121,7 @@ | |||
122 | #include <linux/pci.h> | 121 | #include <linux/pci.h> |
123 | #include <linux/vmalloc.h> | 122 | #include <linux/vmalloc.h> |
124 | #include <linux/pagemap.h> | 123 | #include <linux/pagemap.h> |
124 | #include <linux/screen_info.h> | ||
125 | 125 | ||
126 | #include <asm/io.h> | 126 | #include <asm/io.h> |
127 | 127 | ||
diff --git a/drivers/video/intelfb/intelfbhw.c b/drivers/video/intelfb/intelfbhw.c index 3b78a57924f0..2a9322f9cfdc 100644 --- a/drivers/video/intelfb/intelfbhw.c +++ b/drivers/video/intelfb/intelfbhw.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
25 | #include <linux/string.h> | 25 | #include <linux/string.h> |
26 | #include <linux/mm.h> | 26 | #include <linux/mm.h> |
27 | #include <linux/tty.h> | ||
28 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
29 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
30 | #include <linux/fb.h> | 29 | #include <linux/fb.h> |
diff --git a/drivers/video/kyro/fbdev.c b/drivers/video/kyro/fbdev.c index 2fdbe9b2b04b..f0d614a80f1f 100644 --- a/drivers/video/kyro/fbdev.c +++ b/drivers/video/kyro/fbdev.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/string.h> | 18 | #include <linux/string.h> |
19 | #include <linux/tty.h> | ||
20 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
21 | #include <linux/fb.h> | 20 | #include <linux/fb.h> |
22 | #include <linux/ioctl.h> | 21 | #include <linux/ioctl.h> |
diff --git a/drivers/video/macfb.c b/drivers/video/macfb.c index e6cbd9de944a..80a043807161 100644 --- a/drivers/video/macfb.c +++ b/drivers/video/macfb.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
25 | #include <linux/string.h> | 25 | #include <linux/string.h> |
26 | #include <linux/mm.h> | 26 | #include <linux/mm.h> |
27 | #include <linux/tty.h> | ||
28 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
29 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
30 | #include <linux/nubus.h> | 29 | #include <linux/nubus.h> |
diff --git a/drivers/video/matrox/matroxfb_base.h b/drivers/video/matrox/matroxfb_base.h index b95779b57c06..9c25c2f7966b 100644 --- a/drivers/video/matrox/matroxfb_base.h +++ b/drivers/video/matrox/matroxfb_base.h | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/errno.h> | 30 | #include <linux/errno.h> |
31 | #include <linux/string.h> | 31 | #include <linux/string.h> |
32 | #include <linux/mm.h> | 32 | #include <linux/mm.h> |
33 | #include <linux/tty.h> | ||
34 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
35 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
36 | #include <linux/fb.h> | 35 | #include <linux/fb.h> |
diff --git a/drivers/video/maxinefb.c b/drivers/video/maxinefb.c index f85421bf7cb5..38c8d38de4fd 100644 --- a/drivers/video/maxinefb.c +++ b/drivers/video/maxinefb.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/errno.h> | 29 | #include <linux/errno.h> |
30 | #include <linux/string.h> | 30 | #include <linux/string.h> |
31 | #include <linux/mm.h> | 31 | #include <linux/mm.h> |
32 | #include <linux/tty.h> | ||
33 | #include <linux/slab.h> | 32 | #include <linux/slab.h> |
34 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
35 | #include <linux/init.h> | 34 | #include <linux/init.h> |
diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c index ff5454601e22..d1267904c280 100644 --- a/drivers/video/modedb.c +++ b/drivers/video/modedb.c | |||
@@ -12,7 +12,6 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/tty.h> | ||
16 | #include <linux/fb.h> | 15 | #include <linux/fb.h> |
17 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
18 | 17 | ||
diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c index 773855a311e8..59a6f5fa5ae6 100644 --- a/drivers/video/neofb.c +++ b/drivers/video/neofb.c | |||
@@ -59,7 +59,6 @@ | |||
59 | #include <linux/errno.h> | 59 | #include <linux/errno.h> |
60 | #include <linux/string.h> | 60 | #include <linux/string.h> |
61 | #include <linux/mm.h> | 61 | #include <linux/mm.h> |
62 | #include <linux/tty.h> | ||
63 | #include <linux/slab.h> | 62 | #include <linux/slab.h> |
64 | #include <linux/delay.h> | 63 | #include <linux/delay.h> |
65 | #include <linux/fb.h> | 64 | #include <linux/fb.h> |
diff --git a/drivers/video/nvidia/nv_backlight.c b/drivers/video/nvidia/nv_backlight.c index 1c1c10c699c5..b45f577094ac 100644 --- a/drivers/video/nvidia/nv_backlight.c +++ b/drivers/video/nvidia/nv_backlight.c | |||
@@ -26,9 +26,11 @@ | |||
26 | */ | 26 | */ |
27 | #define MIN_LEVEL 0x158 | 27 | #define MIN_LEVEL 0x158 |
28 | #define MAX_LEVEL 0x534 | 28 | #define MAX_LEVEL 0x534 |
29 | #define LEVEL_STEP ((MAX_LEVEL - MIN_LEVEL) / FB_BACKLIGHT_MAX) | ||
29 | 30 | ||
30 | static struct backlight_properties nvidia_bl_data; | 31 | static struct backlight_properties nvidia_bl_data; |
31 | 32 | ||
33 | /* Call with fb_info->bl_mutex held */ | ||
32 | static int nvidia_bl_get_level_brightness(struct nvidia_par *par, | 34 | static int nvidia_bl_get_level_brightness(struct nvidia_par *par, |
33 | int level) | 35 | int level) |
34 | { | 36 | { |
@@ -36,9 +38,7 @@ static int nvidia_bl_get_level_brightness(struct nvidia_par *par, | |||
36 | int nlevel; | 38 | int nlevel; |
37 | 39 | ||
38 | /* Get and convert the value */ | 40 | /* Get and convert the value */ |
39 | mutex_lock(&info->bl_mutex); | 41 | nlevel = MIN_LEVEL + info->bl_curve[level] * LEVEL_STEP; |
40 | nlevel = info->bl_curve[level] * FB_BACKLIGHT_MAX / MAX_LEVEL; | ||
41 | mutex_unlock(&info->bl_mutex); | ||
42 | 42 | ||
43 | if (nlevel < 0) | 43 | if (nlevel < 0) |
44 | nlevel = 0; | 44 | nlevel = 0; |
@@ -50,7 +50,8 @@ static int nvidia_bl_get_level_brightness(struct nvidia_par *par, | |||
50 | return nlevel; | 50 | return nlevel; |
51 | } | 51 | } |
52 | 52 | ||
53 | static int nvidia_bl_update_status(struct backlight_device *bd) | 53 | /* Call with fb_info->bl_mutex held */ |
54 | static int __nvidia_bl_update_status(struct backlight_device *bd) | ||
54 | { | 55 | { |
55 | struct nvidia_par *par = class_get_devdata(&bd->class_dev); | 56 | struct nvidia_par *par = class_get_devdata(&bd->class_dev); |
56 | u32 tmp_pcrt, tmp_pmc, fpcontrol; | 57 | u32 tmp_pcrt, tmp_pmc, fpcontrol; |
@@ -84,6 +85,19 @@ static int nvidia_bl_update_status(struct backlight_device *bd) | |||
84 | return 0; | 85 | return 0; |
85 | } | 86 | } |
86 | 87 | ||
88 | static int nvidia_bl_update_status(struct backlight_device *bd) | ||
89 | { | ||
90 | struct nvidia_par *par = class_get_devdata(&bd->class_dev); | ||
91 | struct fb_info *info = pci_get_drvdata(par->pci_dev); | ||
92 | int ret; | ||
93 | |||
94 | mutex_lock(&info->bl_mutex); | ||
95 | ret = __nvidia_bl_update_status(bd); | ||
96 | mutex_unlock(&info->bl_mutex); | ||
97 | |||
98 | return ret; | ||
99 | } | ||
100 | |||
87 | static int nvidia_bl_get_brightness(struct backlight_device *bd) | 101 | static int nvidia_bl_get_brightness(struct backlight_device *bd) |
88 | { | 102 | { |
89 | return bd->props->brightness; | 103 | return bd->props->brightness; |
@@ -96,6 +110,16 @@ static struct backlight_properties nvidia_bl_data = { | |||
96 | .max_brightness = (FB_BACKLIGHT_LEVELS - 1), | 110 | .max_brightness = (FB_BACKLIGHT_LEVELS - 1), |
97 | }; | 111 | }; |
98 | 112 | ||
113 | void nvidia_bl_set_power(struct fb_info *info, int power) | ||
114 | { | ||
115 | mutex_lock(&info->bl_mutex); | ||
116 | up(&info->bl_dev->sem); | ||
117 | info->bl_dev->props->power = power; | ||
118 | __nvidia_bl_update_status(info->bl_dev); | ||
119 | down(&info->bl_dev->sem); | ||
120 | mutex_unlock(&info->bl_mutex); | ||
121 | } | ||
122 | |||
99 | void nvidia_bl_init(struct nvidia_par *par) | 123 | void nvidia_bl_init(struct nvidia_par *par) |
100 | { | 124 | { |
101 | struct fb_info *info = pci_get_drvdata(par->pci_dev); | 125 | struct fb_info *info = pci_get_drvdata(par->pci_dev); |
diff --git a/drivers/video/nvidia/nv_proto.h b/drivers/video/nvidia/nv_proto.h index 6fba656cd56b..861271017655 100644 --- a/drivers/video/nvidia/nv_proto.h +++ b/drivers/video/nvidia/nv_proto.h | |||
@@ -68,9 +68,11 @@ extern u8 byte_rev[256]; | |||
68 | #ifdef CONFIG_FB_NVIDIA_BACKLIGHT | 68 | #ifdef CONFIG_FB_NVIDIA_BACKLIGHT |
69 | extern void nvidia_bl_init(struct nvidia_par *par); | 69 | extern void nvidia_bl_init(struct nvidia_par *par); |
70 | extern void nvidia_bl_exit(struct nvidia_par *par); | 70 | extern void nvidia_bl_exit(struct nvidia_par *par); |
71 | extern void nvidia_bl_set_power(struct fb_info *info, int power); | ||
71 | #else | 72 | #else |
72 | static inline void nvidia_bl_init(struct nvidia_par *par) {} | 73 | static inline void nvidia_bl_init(struct nvidia_par *par) {} |
73 | static inline void nvidia_bl_exit(struct nvidia_par *par) {} | 74 | static inline void nvidia_bl_exit(struct nvidia_par *par) {} |
75 | static inline void nvidia_bl_set_power(struct fb_info *info, int power) {} | ||
74 | #endif | 76 | #endif |
75 | 77 | ||
76 | #endif /* __NV_PROTO_H__ */ | 78 | #endif /* __NV_PROTO_H__ */ |
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index b02d6033cc0c..9f2066f0745a 100644 --- a/drivers/video/nvidia/nvidia.c +++ b/drivers/video/nvidia/nvidia.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <linux/string.h> | 15 | #include <linux/string.h> |
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/tty.h> | ||
18 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
19 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
20 | #include <linux/fb.h> | 19 | #include <linux/fb.h> |
@@ -933,16 +932,7 @@ static int nvidiafb_blank(int blank, struct fb_info *info) | |||
933 | NVWriteSeq(par, 0x01, tmp); | 932 | NVWriteSeq(par, 0x01, tmp); |
934 | NVWriteCrtc(par, 0x1a, vesa); | 933 | NVWriteCrtc(par, 0x1a, vesa); |
935 | 934 | ||
936 | #ifdef CONFIG_FB_NVIDIA_BACKLIGHT | 935 | nvidia_bl_set_power(info, blank); |
937 | mutex_lock(&info->bl_mutex); | ||
938 | if (info->bl_dev) { | ||
939 | down(&info->bl_dev->sem); | ||
940 | info->bl_dev->props->power = blank; | ||
941 | info->bl_dev->props->update_status(info->bl_dev); | ||
942 | up(&info->bl_dev->sem); | ||
943 | } | ||
944 | mutex_unlock(&info->bl_mutex); | ||
945 | #endif | ||
946 | 936 | ||
947 | NVTRACE_LEAVE(); | 937 | NVTRACE_LEAVE(); |
948 | 938 | ||
diff --git a/drivers/video/offb.c b/drivers/video/offb.c index 71ce1fa45cf4..ce5f3031b99b 100644 --- a/drivers/video/offb.c +++ b/drivers/video/offb.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/string.h> | 18 | #include <linux/string.h> |
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | #include <linux/tty.h> | ||
21 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
22 | #include <linux/vmalloc.h> | 21 | #include <linux/vmalloc.h> |
23 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c index 450e802e0aa8..983be3ec2345 100644 --- a/drivers/video/platinumfb.c +++ b/drivers/video/platinumfb.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
23 | #include <linux/string.h> | 23 | #include <linux/string.h> |
24 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
25 | #include <linux/tty.h> | ||
26 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
27 | #include <linux/vmalloc.h> | 26 | #include <linux/vmalloc.h> |
28 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
diff --git a/drivers/video/pm2fb.c b/drivers/video/pm2fb.c index 49a203e1591c..a560a2223825 100644 --- a/drivers/video/pm2fb.c +++ b/drivers/video/pm2fb.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/errno.h> | 33 | #include <linux/errno.h> |
34 | #include <linux/string.h> | 34 | #include <linux/string.h> |
35 | #include <linux/mm.h> | 35 | #include <linux/mm.h> |
36 | #include <linux/tty.h> | ||
37 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
38 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
39 | #include <linux/fb.h> | 38 | #include <linux/fb.h> |
diff --git a/drivers/video/pm3fb.c b/drivers/video/pm3fb.c index 0e0f977b05ee..1d81ef47efd3 100644 --- a/drivers/video/pm3fb.c +++ b/drivers/video/pm3fb.c | |||
@@ -57,7 +57,6 @@ | |||
57 | #include <linux/errno.h> | 57 | #include <linux/errno.h> |
58 | #include <linux/string.h> | 58 | #include <linux/string.h> |
59 | #include <linux/mm.h> | 59 | #include <linux/mm.h> |
60 | #include <linux/tty.h> | ||
61 | #include <linux/slab.h> | 60 | #include <linux/slab.h> |
62 | #include <linux/vmalloc.h> | 61 | #include <linux/vmalloc.h> |
63 | #include <linux/delay.h> | 62 | #include <linux/delay.h> |
diff --git a/drivers/video/pmag-aa-fb.c b/drivers/video/pmag-aa-fb.c index d92f352211ef..68ca3cc40770 100644 --- a/drivers/video/pmag-aa-fb.c +++ b/drivers/video/pmag-aa-fb.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/string.h> | 29 | #include <linux/string.h> |
30 | #include <linux/timer.h> | 30 | #include <linux/timer.h> |
31 | #include <linux/mm.h> | 31 | #include <linux/mm.h> |
32 | #include <linux/tty.h> | ||
33 | #include <linux/slab.h> | 32 | #include <linux/slab.h> |
34 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
35 | #include <linux/init.h> | 34 | #include <linux/init.h> |
diff --git a/drivers/video/pvr2fb.c b/drivers/video/pvr2fb.c index 4a1e0e856920..940ba2be55e9 100644 --- a/drivers/video/pvr2fb.c +++ b/drivers/video/pvr2fb.c | |||
@@ -53,7 +53,6 @@ | |||
53 | #include <linux/errno.h> | 53 | #include <linux/errno.h> |
54 | #include <linux/string.h> | 54 | #include <linux/string.h> |
55 | #include <linux/mm.h> | 55 | #include <linux/mm.h> |
56 | #include <linux/tty.h> | ||
57 | #include <linux/slab.h> | 56 | #include <linux/slab.h> |
58 | #include <linux/delay.h> | 57 | #include <linux/delay.h> |
59 | #include <linux/interrupt.h> | 58 | #include <linux/interrupt.h> |
diff --git a/drivers/video/q40fb.c b/drivers/video/q40fb.c index fc91dbf896d2..48536c3e58a4 100644 --- a/drivers/video/q40fb.c +++ b/drivers/video/q40fb.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <linux/string.h> | 15 | #include <linux/string.h> |
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/tty.h> | ||
18 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
19 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
20 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
diff --git a/drivers/video/retz3fb.c b/drivers/video/retz3fb.c index 5e2c64f622cb..cf41ff177644 100644 --- a/drivers/video/retz3fb.c +++ b/drivers/video/retz3fb.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
26 | #include <linux/string.h> | 26 | #include <linux/string.h> |
27 | #include <linux/mm.h> | 27 | #include <linux/mm.h> |
28 | #include <linux/tty.h> | ||
29 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
30 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
31 | #include <linux/fb.h> | 30 | #include <linux/fb.h> |
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c index 2788655e6e7d..33dddbae5420 100644 --- a/drivers/video/riva/fbdev.c +++ b/drivers/video/riva/fbdev.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
35 | #include <linux/string.h> | 35 | #include <linux/string.h> |
36 | #include <linux/mm.h> | 36 | #include <linux/mm.h> |
37 | #include <linux/tty.h> | ||
38 | #include <linux/slab.h> | 37 | #include <linux/slab.h> |
39 | #include <linux/delay.h> | 38 | #include <linux/delay.h> |
40 | #include <linux/fb.h> | 39 | #include <linux/fb.h> |
@@ -278,9 +277,11 @@ static const struct riva_regs reg_template = { | |||
278 | */ | 277 | */ |
279 | #define MIN_LEVEL 0x158 | 278 | #define MIN_LEVEL 0x158 |
280 | #define MAX_LEVEL 0x534 | 279 | #define MAX_LEVEL 0x534 |
280 | #define LEVEL_STEP ((MAX_LEVEL - MIN_LEVEL) / FB_BACKLIGHT_MAX) | ||
281 | 281 | ||
282 | static struct backlight_properties riva_bl_data; | 282 | static struct backlight_properties riva_bl_data; |
283 | 283 | ||
284 | /* Call with fb_info->bl_mutex held */ | ||
284 | static int riva_bl_get_level_brightness(struct riva_par *par, | 285 | static int riva_bl_get_level_brightness(struct riva_par *par, |
285 | int level) | 286 | int level) |
286 | { | 287 | { |
@@ -288,9 +289,7 @@ static int riva_bl_get_level_brightness(struct riva_par *par, | |||
288 | int nlevel; | 289 | int nlevel; |
289 | 290 | ||
290 | /* Get and convert the value */ | 291 | /* Get and convert the value */ |
291 | mutex_lock(&info->bl_mutex); | 292 | nlevel = MIN_LEVEL + info->bl_curve[level] * LEVEL_STEP; |
292 | nlevel = info->bl_curve[level] * FB_BACKLIGHT_MAX / MAX_LEVEL; | ||
293 | mutex_unlock(&info->bl_mutex); | ||
294 | 293 | ||
295 | if (nlevel < 0) | 294 | if (nlevel < 0) |
296 | nlevel = 0; | 295 | nlevel = 0; |
@@ -302,7 +301,8 @@ static int riva_bl_get_level_brightness(struct riva_par *par, | |||
302 | return nlevel; | 301 | return nlevel; |
303 | } | 302 | } |
304 | 303 | ||
305 | static int riva_bl_update_status(struct backlight_device *bd) | 304 | /* Call with fb_info->bl_mutex held */ |
305 | static int __riva_bl_update_status(struct backlight_device *bd) | ||
306 | { | 306 | { |
307 | struct riva_par *par = class_get_devdata(&bd->class_dev); | 307 | struct riva_par *par = class_get_devdata(&bd->class_dev); |
308 | U032 tmp_pcrt, tmp_pmc; | 308 | U032 tmp_pcrt, tmp_pmc; |
@@ -327,6 +327,19 @@ static int riva_bl_update_status(struct backlight_device *bd) | |||
327 | return 0; | 327 | return 0; |
328 | } | 328 | } |
329 | 329 | ||
330 | static int riva_bl_update_status(struct backlight_device *bd) | ||
331 | { | ||
332 | struct riva_par *par = class_get_devdata(&bd->class_dev); | ||
333 | struct fb_info *info = pci_get_drvdata(par->pdev); | ||
334 | int ret; | ||
335 | |||
336 | mutex_lock(&info->bl_mutex); | ||
337 | ret = __riva_bl_update_status(bd); | ||
338 | mutex_unlock(&info->bl_mutex); | ||
339 | |||
340 | return ret; | ||
341 | } | ||
342 | |||
330 | static int riva_bl_get_brightness(struct backlight_device *bd) | 343 | static int riva_bl_get_brightness(struct backlight_device *bd) |
331 | { | 344 | { |
332 | return bd->props->brightness; | 345 | return bd->props->brightness; |
@@ -339,6 +352,16 @@ static struct backlight_properties riva_bl_data = { | |||
339 | .max_brightness = (FB_BACKLIGHT_LEVELS - 1), | 352 | .max_brightness = (FB_BACKLIGHT_LEVELS - 1), |
340 | }; | 353 | }; |
341 | 354 | ||
355 | static void riva_bl_set_power(struct fb_info *info, int power) | ||
356 | { | ||
357 | mutex_lock(&info->bl_mutex); | ||
358 | up(&info->bl_dev->sem); | ||
359 | info->bl_dev->props->power = power; | ||
360 | __riva_bl_update_status(info->bl_dev); | ||
361 | down(&info->bl_dev->sem); | ||
362 | mutex_unlock(&info->bl_mutex); | ||
363 | } | ||
364 | |||
342 | static void riva_bl_init(struct riva_par *par) | 365 | static void riva_bl_init(struct riva_par *par) |
343 | { | 366 | { |
344 | struct fb_info *info = pci_get_drvdata(par->pdev); | 367 | struct fb_info *info = pci_get_drvdata(par->pdev); |
@@ -419,6 +442,7 @@ static void riva_bl_exit(struct riva_par *par) | |||
419 | #else | 442 | #else |
420 | static inline void riva_bl_init(struct riva_par *par) {} | 443 | static inline void riva_bl_init(struct riva_par *par) {} |
421 | static inline void riva_bl_exit(struct riva_par *par) {} | 444 | static inline void riva_bl_exit(struct riva_par *par) {} |
445 | static inline void riva_bl_set_power(struct fb_info *info, int power) {} | ||
422 | #endif /* CONFIG_FB_RIVA_BACKLIGHT */ | 446 | #endif /* CONFIG_FB_RIVA_BACKLIGHT */ |
423 | 447 | ||
424 | /* ------------------------------------------------------------------------- * | 448 | /* ------------------------------------------------------------------------- * |
@@ -1337,16 +1361,7 @@ static int rivafb_blank(int blank, struct fb_info *info) | |||
1337 | SEQout(par, 0x01, tmp); | 1361 | SEQout(par, 0x01, tmp); |
1338 | CRTCout(par, 0x1a, vesa); | 1362 | CRTCout(par, 0x1a, vesa); |
1339 | 1363 | ||
1340 | #ifdef CONFIG_FB_RIVA_BACKLIGHT | 1364 | riva_bl_set_power(info, blank); |
1341 | mutex_lock(&info->bl_mutex); | ||
1342 | if (info->bl_dev) { | ||
1343 | down(&info->bl_dev->sem); | ||
1344 | info->bl_dev->props->power = blank; | ||
1345 | info->bl_dev->props->update_status(info->bl_dev); | ||
1346 | up(&info->bl_dev->sem); | ||
1347 | } | ||
1348 | mutex_unlock(&info->bl_mutex); | ||
1349 | #endif | ||
1350 | 1365 | ||
1351 | NVTRACE_LEAVE(); | 1366 | NVTRACE_LEAVE(); |
1352 | 1367 | ||
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c index f461eb10cc79..ad3bdd6f1ac1 100644 --- a/drivers/video/s3c2410fb.c +++ b/drivers/video/s3c2410fb.c | |||
@@ -76,7 +76,6 @@ | |||
76 | #include <linux/errno.h> | 76 | #include <linux/errno.h> |
77 | #include <linux/string.h> | 77 | #include <linux/string.h> |
78 | #include <linux/mm.h> | 78 | #include <linux/mm.h> |
79 | #include <linux/tty.h> | ||
80 | #include <linux/slab.h> | 79 | #include <linux/slab.h> |
81 | #include <linux/delay.h> | 80 | #include <linux/delay.h> |
82 | #include <linux/fb.h> | 81 | #include <linux/fb.h> |
diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c index 4729af477fbf..461e094e7b45 100644 --- a/drivers/video/savage/savagefb_driver.c +++ b/drivers/video/savage/savagefb_driver.c | |||
@@ -46,7 +46,6 @@ | |||
46 | #include <linux/errno.h> | 46 | #include <linux/errno.h> |
47 | #include <linux/string.h> | 47 | #include <linux/string.h> |
48 | #include <linux/mm.h> | 48 | #include <linux/mm.h> |
49 | #include <linux/tty.h> | ||
50 | #include <linux/slab.h> | 49 | #include <linux/slab.h> |
51 | #include <linux/delay.h> | 50 | #include <linux/delay.h> |
52 | #include <linux/fb.h> | 51 | #include <linux/fb.h> |
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c index b848ca7db7f9..895ebda7d9e3 100644 --- a/drivers/video/sis/sis_main.c +++ b/drivers/video/sis/sis_main.c | |||
@@ -44,7 +44,13 @@ | |||
44 | #include <linux/errno.h> | 44 | #include <linux/errno.h> |
45 | #include <linux/string.h> | 45 | #include <linux/string.h> |
46 | #include <linux/mm.h> | 46 | #include <linux/mm.h> |
47 | |||
48 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17) | ||
47 | #include <linux/tty.h> | 49 | #include <linux/tty.h> |
50 | #else | ||
51 | #include <linux/screen_info.h> | ||
52 | #endif | ||
53 | |||
48 | #include <linux/slab.h> | 54 | #include <linux/slab.h> |
49 | #include <linux/fb.h> | 55 | #include <linux/fb.h> |
50 | #include <linux/selection.h> | 56 | #include <linux/selection.h> |
diff --git a/drivers/video/skeletonfb.c b/drivers/video/skeletonfb.c index 67f429e93189..bb96cb65fdaa 100644 --- a/drivers/video/skeletonfb.c +++ b/drivers/video/skeletonfb.c | |||
@@ -47,7 +47,6 @@ | |||
47 | #include <linux/errno.h> | 47 | #include <linux/errno.h> |
48 | #include <linux/string.h> | 48 | #include <linux/string.h> |
49 | #include <linux/mm.h> | 49 | #include <linux/mm.h> |
50 | #include <linux/tty.h> | ||
51 | #include <linux/slab.h> | 50 | #include <linux/slab.h> |
52 | #include <linux/delay.h> | 51 | #include <linux/delay.h> |
53 | #include <linux/fb.h> | 52 | #include <linux/fb.h> |
diff --git a/drivers/video/sun3fb.c b/drivers/video/sun3fb.c index e046e20f02b9..f80356dfa8e8 100644 --- a/drivers/video/sun3fb.c +++ b/drivers/video/sun3fb.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/errno.h> | 30 | #include <linux/errno.h> |
31 | #include <linux/string.h> | 31 | #include <linux/string.h> |
32 | #include <linux/mm.h> | 32 | #include <linux/mm.h> |
33 | #include <linux/tty.h> | ||
34 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
35 | #include <linux/vmalloc.h> | 34 | #include <linux/vmalloc.h> |
36 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
diff --git a/drivers/video/tdfxfb.c b/drivers/video/tdfxfb.c index 239b1496874b..689ce0270b81 100644 --- a/drivers/video/tdfxfb.c +++ b/drivers/video/tdfxfb.c | |||
@@ -63,7 +63,6 @@ | |||
63 | #include <linux/errno.h> | 63 | #include <linux/errno.h> |
64 | #include <linux/string.h> | 64 | #include <linux/string.h> |
65 | #include <linux/mm.h> | 65 | #include <linux/mm.h> |
66 | #include <linux/tty.h> | ||
67 | #include <linux/slab.h> | 66 | #include <linux/slab.h> |
68 | #include <linux/delay.h> | 67 | #include <linux/delay.h> |
69 | #include <linux/interrupt.h> | 68 | #include <linux/interrupt.h> |
diff --git a/drivers/video/tgafb.c b/drivers/video/tgafb.c index 6c2c78ab9827..94fde625a6c0 100644 --- a/drivers/video/tgafb.c +++ b/drivers/video/tgafb.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/string.h> | 18 | #include <linux/string.h> |
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | #include <linux/tty.h> | ||
21 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
22 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
23 | #include <linux/init.h> | 22 | #include <linux/init.h> |
diff --git a/drivers/video/tx3912fb.c b/drivers/video/tx3912fb.c index d904da44e1aa..07389ba01eff 100644 --- a/drivers/video/tx3912fb.c +++ b/drivers/video/tx3912fb.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/tty.h> | ||
18 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
19 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
20 | #include <linux/init.h> | 19 | #include <linux/init.h> |
diff --git a/drivers/video/valkyriefb.c b/drivers/video/valkyriefb.c index 1d76c035050e..47f27924a7d7 100644 --- a/drivers/video/valkyriefb.c +++ b/drivers/video/valkyriefb.c | |||
@@ -44,7 +44,6 @@ | |||
44 | #include <linux/errno.h> | 44 | #include <linux/errno.h> |
45 | #include <linux/string.h> | 45 | #include <linux/string.h> |
46 | #include <linux/mm.h> | 46 | #include <linux/mm.h> |
47 | #include <linux/tty.h> | ||
48 | #include <linux/slab.h> | 47 | #include <linux/slab.h> |
49 | #include <linux/vmalloc.h> | 48 | #include <linux/vmalloc.h> |
50 | #include <linux/delay.h> | 49 | #include <linux/delay.h> |
diff --git a/drivers/video/vesafb.c b/drivers/video/vesafb.c index 5718924b677f..2196448396ec 100644 --- a/drivers/video/vesafb.c +++ b/drivers/video/vesafb.c | |||
@@ -13,13 +13,13 @@ | |||
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/tty.h> | ||
17 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
18 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
19 | #include <linux/fb.h> | 18 | #include <linux/fb.h> |
20 | #include <linux/ioport.h> | 19 | #include <linux/ioport.h> |
21 | #include <linux/init.h> | 20 | #include <linux/init.h> |
22 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/screen_info.h> | ||
23 | 23 | ||
24 | #include <video/vga.h> | 24 | #include <video/vga.h> |
25 | #include <asm/io.h> | 25 | #include <asm/io.h> |
diff --git a/drivers/video/vfb.c b/drivers/video/vfb.c index d073ffb6e1f9..a9b99b01bd8e 100644 --- a/drivers/video/vfb.c +++ b/drivers/video/vfb.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/tty.h> | ||
19 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
20 | #include <linux/vmalloc.h> | 19 | #include <linux/vmalloc.h> |
21 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
diff --git a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c index 3c404c9bd36c..43d5a6d9c4a6 100644 --- a/drivers/video/vga16fb.c +++ b/drivers/video/vga16fb.c | |||
@@ -15,13 +15,13 @@ | |||
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/tty.h> | ||
19 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
20 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
21 | #include <linux/fb.h> | 20 | #include <linux/fb.h> |
22 | #include <linux/ioport.h> | 21 | #include <linux/ioport.h> |
23 | #include <linux/init.h> | 22 | #include <linux/init.h> |
24 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/screen_info.h> | ||
25 | 25 | ||
26 | #include <asm/io.h> | 26 | #include <asm/io.h> |
27 | #include <video/vga.h> | 27 | #include <video/vga.h> |
diff --git a/drivers/video/virgefb.c b/drivers/video/virgefb.c index 5ea2345dab99..64378959dd7b 100644 --- a/drivers/video/virgefb.c +++ b/drivers/video/virgefb.c | |||
@@ -39,7 +39,6 @@ | |||
39 | #include <linux/errno.h> | 39 | #include <linux/errno.h> |
40 | #include <linux/string.h> | 40 | #include <linux/string.h> |
41 | #include <linux/mm.h> | 41 | #include <linux/mm.h> |
42 | #include <linux/tty.h> | ||
43 | #include <linux/slab.h> | 42 | #include <linux/slab.h> |
44 | #include <linux/delay.h> | 43 | #include <linux/delay.h> |
45 | #include <linux/zorro.h> | 44 | #include <linux/zorro.h> |