resolve the warning: initialization from incompatible pointer type
author许盛飞 <xsf@rock-chips.com>
Fri, 13 Jun 2014 11:21:41 +0000 (19:21 +0800)
committer许盛飞 <xsf@rock-chips.com>
Fri, 13 Jun 2014 11:21:41 +0000 (19:21 +0800)
drivers/video/backlight/pwm_bl.c

index ec14d6793e1af267a79889bc6984d8069bdffe0c..eeb1bf3da3d2e78e0809b3d254ed53abad20cde3 100644 (file)
@@ -347,6 +347,17 @@ static int pwm_backlight_remove(struct platform_device *pdev)
 
        return 0;
 }
+static void pwm_backlight_shutdown(struct platform_device *pdev)
+{
+       struct backlight_device *bl = platform_get_drvdata(pdev);
+       struct pwm_bl_data *pb = bl_get_data(bl);
+
+       backlight_device_unregister(bl);
+       pwm_backlight_power_off(pb);
+
+       if (pb->exit)
+               pb->exit(&pdev->dev);
+}
 
 #ifdef CONFIG_PM_SLEEP
 static int pwm_backlight_suspend(struct device *dev)
@@ -393,7 +404,7 @@ static struct platform_driver pwm_backlight_driver = {
        },
        .probe          = pwm_backlight_probe,
        .remove         = pwm_backlight_remove,
-       .shutdown       = pwm_backlight_remove,
+       .shutdown       = pwm_backlight_shutdown,
 };
 
 module_platform_driver(pwm_backlight_driver);