]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/video/aty/atyfb_base.c
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
[linux-2.6-omap-h63xx.git] / drivers / video / aty / atyfb_base.c
index 1507d19f481f8ebe84904a152a4f94333fc8f19e..510e4ea296ed14b8fa180dd1db62b53d2010d65b 100644 (file)
@@ -2199,6 +2199,9 @@ static struct backlight_properties aty_bl_data = {
 
 static void aty_bl_set_power(struct fb_info *info, int power)
 {
+       if (info->bl_dev == NULL)
+               return;
+
        mutex_lock(&info->bl_mutex);
        up(&info->bl_dev->sem);
        info->bl_dev->props->power = power;
@@ -2223,7 +2226,7 @@ static void aty_bl_init(struct atyfb_par *par)
        bd = backlight_device_register(name, par, &aty_bl_data);
        if (IS_ERR(bd)) {
                info->bl_dev = NULL;
-               printk("aty: Backlight registration failed\n");
+               printk(KERN_WARNING "aty: Backlight registration failed\n");
                goto error;
        }
 
@@ -2812,7 +2815,7 @@ static int atyfb_blank(int blank, struct fb_info *info)
        if (par->lock_blank || par->asleep)
                return 0;
 
-#ifdef CONFIG_PMAC_BACKLIGHT
+#ifdef CONFIG_FB_ATY_BACKLIGHT
        if (machine_is(powermac) && blank > FB_BLANK_NORMAL)
                aty_bl_set_power(info, FB_BLANK_POWERDOWN);
 #elif defined(CONFIG_FB_ATY_GENERIC_LCD)
@@ -2844,7 +2847,7 @@ static int atyfb_blank(int blank, struct fb_info *info)
        }
        aty_st_le32(CRTC_GEN_CNTL, gen_cntl, par);
 
-#ifdef CONFIG_PMAC_BACKLIGHT
+#ifdef CONFIG_FB_ATY_BACKLIGHT
        if (machine_is(powermac) && blank <= FB_BLANK_NORMAL)
                aty_bl_set_power(info, FB_BLANK_UNBLANK);
 #elif defined(CONFIG_FB_ATY_GENERIC_LCD)