X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fvideo%2Fbacklight%2Fhp680_bl.c;h=c07d8207fb549e1412b91a793f98e8b3d9719646;hb=refs%2Fheads%2Fvserver;hp=ffc72ae3ada80a01f98c959099b004e57bc5aed4;hpb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;p=linux-2.6.git diff --git a/drivers/video/backlight/hp680_bl.c b/drivers/video/backlight/hp680_bl.c index ffc72ae3a..c07d8207f 100644 --- a/drivers/video/backlight/hp680_bl.c +++ b/drivers/video/backlight/hp680_bl.c @@ -19,8 +19,8 @@ #include #include -#include -#include +#include +#include #define HP680_MAX_INTENSITY 255 #define HP680_DEFAULT_INTENSITY 10 @@ -105,7 +105,7 @@ static struct backlight_properties hp680bl_data = { static int __init hp680bl_probe(struct platform_device *dev) { hp680_backlight_device = backlight_device_register ("hp680-bl", - NULL, &hp680bl_data); + &dev->dev, NULL, &hp680bl_data); if (IS_ERR (hp680_backlight_device)) return PTR_ERR (hp680_backlight_device); @@ -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 "); +MODULE_AUTHOR("Andriy Skulysh "); MODULE_DESCRIPTION("HP Jornada 680 Backlight Driver"); MODULE_LICENSE("GPL");