mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
mfd: ab8500-sysctrl: Always enable pm_power_off handler
AB8500 sysctrl driver implements a pm_power_off handler, but that is currently not registered until a specific platform data field is enabled. This patch drops the platform data field and always registers ab8500_power_off if no other pm_power_off handler was defined before, and also introduces the necessary cleanup code in the driver's remove function. Acked-by: Linus Walleij <[email protected]> Signed-off-by: Fabio Baltieri <[email protected]> Signed-off-by: Lee Jones <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
This commit is contained in:
parent
955de2eab3
commit
0b8ebdb188
2 changed files with 5 additions and 3 deletions
|
|
@ -193,7 +193,7 @@ static int ab8500_sysctrl_probe(struct platform_device *pdev)
|
|||
|
||||
sysctrl_dev = &pdev->dev;
|
||||
|
||||
if (plat->pm_power_off)
|
||||
if (!pm_power_off)
|
||||
pm_power_off = ab8500_power_off;
|
||||
|
||||
pdata = plat->sysctrl;
|
||||
|
|
@ -228,6 +228,10 @@ static int ab8500_sysctrl_probe(struct platform_device *pdev)
|
|||
static int ab8500_sysctrl_remove(struct platform_device *pdev)
|
||||
{
|
||||
sysctrl_dev = NULL;
|
||||
|
||||
if (pm_power_off == ab8500_power_off)
|
||||
pm_power_off = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue