]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/video/chipsfb.c
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight
[linux-2.6-omap-h63xx.git] / drivers / video / chipsfb.c
index 72ff6bf75e5ed8cbabc87d83f882b77702fafa7a..f48e8c534c8797f228c1a75162735b602a71e94a 100644 (file)
  *  more details.
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/string.h>
 #include <linux/mm.h>
-#include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/delay.h>
@@ -147,12 +145,6 @@ static int chipsfb_set_par(struct fb_info *info)
 
 static int chipsfb_blank(int blank, struct fb_info *info)
 {
-#ifdef CONFIG_PMAC_BACKLIGHT
-       // used to disable backlight only for blank > 1, but it seems
-       // useful at blank = 1 too (saves battery, extends backlight life)
-       set_backlight_enable(!blank);
-#endif /* CONFIG_PMAC_BACKLIGHT */
-
        return 1;       /* get fb_blank to set the colormap to all black */
 }
 
@@ -300,7 +292,7 @@ static void __init chips_hw_init(void)
                write_fr(chips_init_fr[i].addr, chips_init_fr[i].data);
 }
 
-static struct fb_fix_screeninfo chipsfb_fix __initdata = {
+static struct fb_fix_screeninfo chipsfb_fix __devinitdata = {
        .id =           "C&T 65550",
        .type =         FB_TYPE_PACKED_PIXELS,
        .visual =       FB_VISUAL_PSEUDOCOLOR,
@@ -317,7 +309,7 @@ static struct fb_fix_screeninfo chipsfb_fix __initdata = {
        .smem_len =     0x100000,       /* 1MB */
 };
 
-static struct fb_var_screeninfo chipsfb_var __initdata = {
+static struct fb_var_screeninfo chipsfb_var __devinitdata = {
        .xres = 800,
        .yres = 600,
        .xres_virtual = 800,
@@ -338,7 +330,7 @@ static struct fb_var_screeninfo chipsfb_var __initdata = {
        .vsync_len = 8,
 };
 
-static void __init init_chips(struct fb_info *p, unsigned long addr)
+static void __devinit init_chips(struct fb_info *p, unsigned long addr)
 {
        memset(p->screen_base, 0, 0x100000);
 
@@ -401,7 +393,12 @@ chipsfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent)
 
 #ifdef CONFIG_PMAC_BACKLIGHT
        /* turn on the backlight */
-       set_backlight_enable(1);
+       mutex_lock(&pmac_backlight_mutex);
+       if (pmac_backlight) {
+               pmac_backlight->props.power = FB_BLANK_UNBLANK;
+               backlight_update_status(pmac_backlight);
+       }
+       mutex_unlock(&pmac_backlight_mutex);
 #endif /* CONFIG_PMAC_BACKLIGHT */
 
 #ifdef CONFIG_PPC