]> err.no Git - linux-2.6/blobdiff - drivers/video/backlight/hp680_bl.c
Pull bugfix into test branch
[linux-2.6] / drivers / video / backlight / hp680_bl.c
index a71e984c93d47aa8c8678ce1abb98a29b0a39336..1c569fb543ae80f6bef9d6954954398ae358a1c2 100644 (file)
 #include <linux/backlight.h>
 
 #include <asm/cpu/dac.h>
-#include <asm/hp6xx/hp6xx.h>
-#include <asm/hd64461/hd64461.h>
+#include <asm/hp6xx.h>
+#include <asm/hd64461.h>
 
 #define HP680_MAX_INTENSITY 255
 #define HP680_DEFAULT_INTENSITY 10
 
 static int hp680bl_suspended;
 static int current_intensity = 0;
-static spinlock_t bl_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(bl_lock);
 static struct backlight_device *hp680_backlight_device;
 
 static void hp680bl_send_intensity(struct backlight_device *bd)
@@ -117,6 +117,10 @@ static int __init hp680bl_probe(struct platform_device *dev)
 
 static int hp680bl_remove(struct platform_device *dev)
 {
+       hp680bl_data.brightness = 0;
+       hp680bl_data.power = 0;
+       hp680bl_send_intensity(hp680_backlight_device);
+
        backlight_device_unregister(hp680_backlight_device);
 
        return 0;
@@ -163,6 +167,6 @@ static void __exit hp680bl_exit(void)
 module_init(hp680bl_init);
 module_exit(hp680bl_exit);
 
-MODULE_AUTHOR("Andriy Skulysh <askulysh@image.kiev.ua>");
+MODULE_AUTHOR("Andriy Skulysh <askulysh@gmail.com>");
 MODULE_DESCRIPTION("HP Jornada 680 Backlight Driver");
 MODULE_LICENSE("GPL");