rk: backlight: unregister earlysuspend when shutdown
author黄涛 <huangtao@rock-chips.com>
Thu, 31 May 2012 01:36:03 +0000 (09:36 +0800)
committer黄涛 <huangtao@rock-chips.com>
Thu, 31 May 2012 01:43:26 +0000 (09:43 +0800)
fix this warning:
WARNING: at drivers/gpio/gpiolib.c:101 gpio_ensure_requested+0x48/0x114()
autorequest GPIO-331
[<c043b170>] (unwind_backtrace+0x0/0xf0) from [<c0461800>] (warn_slowpath_common+0x4c/0x64)
[<c0461800>] (warn_slowpath_common+0x4c/0x64) from [<c0461898>] (warn_slowpath_fmt+0x2c/0x3c)
[<c0461898>] (warn_slowpath_fmt+0x2c/0x3c) from [<c05bb514>] (gpio_ensure_requested+0x48/0x114)
[<c05bb514>] (gpio_ensure_requested+0x48/0x114) from [<c05bbbb4>] (gpio_direction_output+0x7c/0xfc)
[<c05bbbb4>] (gpio_direction_output+0x7c/0xfc) from [<c044ccf8>] (rk29_backlight_pwm_suspend+0x54/0x74)
[<c044ccf8>] (rk29_backlight_pwm_suspend+0x54/0x74) from [<c05c3d0c>] (rk29_bl_suspend+0x78/0x90)
[<c05c3d0c>] (rk29_bl_suspend+0x78/0x90) from [<c0494374>] (early_suspend+0xc4/0x12c)
[<c0494374>] (early_suspend+0xc4/0x12c) from [<c04745c4>] (process_one_work+0x250/0x3ac)
[<c04745c4>] (process_one_work+0x250/0x3ac) from [<c0474b08>] (worker_thread+0x22c/0x3ec)
[<c0474b08>] (worker_thread+0x22c/0x3ec) from [<c047a484>] (kthread+0x80/0x88)
[<c047a484>] (kthread+0x80/0x88) from [<c04365f8>] (kernel_thread_exit+0x0/0x8)

drivers/video/backlight/rk29_backlight.c

index ef75293bb6257dcac25b9da14e27c76e561d241d..a60a0245797c41d9a7052cca4ca6ce85052c1631 100755 (executable)
@@ -263,6 +263,8 @@ static void rk29_backlight_shutdown(struct platform_device *pdev)
 {
        struct rk29_bl_info *rk29_bl_info = pdev->dev.platform_data;
 
+       unregister_early_suspend(&bl_early_suspend);
+
        rk29_bl->props.brightness >>= 1;
        rk29_bl_update_status(rk29_bl);
        mdelay(100);