From: 许盛飞 Date: Fri, 13 Jun 2014 11:21:41 +0000 (+0800) Subject: resolve the warning: initialization from incompatible pointer type X-Git-Tag: firefly_0821_release~5118 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9bab410006a59227d0c8fcc1ff87ed4263490bba;p=firefly-linux-kernel-4.4.55.git resolve the warning: initialization from incompatible pointer type --- diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index ec14d6793e1a..eeb1bf3da3d2 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c @@ -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);