diff options
author | Fabio Baltieri <fabio.baltieri@linaro.org> | 2013-05-09 07:08:08 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-05-16 18:42:33 -0400 |
commit | 0b8ebdb18888c55588b932f4f564b9c9529de627 (patch) | |
tree | 9ed650b39b506419a9162e96c098b3998377eaff /drivers/mfd/ab8500-sysctrl.c | |
parent | 955de2eab3fd89bc6d5735817710926ba5817450 (diff) |
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 <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/ab8500-sysctrl.c')
-rw-r--r-- | drivers/mfd/ab8500-sysctrl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mfd/ab8500-sysctrl.c b/drivers/mfd/ab8500-sysctrl.c index b851692b0755..0c20361eae26 100644 --- a/drivers/mfd/ab8500-sysctrl.c +++ b/drivers/mfd/ab8500-sysctrl.c | |||
@@ -193,7 +193,7 @@ static int ab8500_sysctrl_probe(struct platform_device *pdev) | |||
193 | 193 | ||
194 | sysctrl_dev = &pdev->dev; | 194 | sysctrl_dev = &pdev->dev; |
195 | 195 | ||
196 | if (plat->pm_power_off) | 196 | if (!pm_power_off) |
197 | pm_power_off = ab8500_power_off; | 197 | pm_power_off = ab8500_power_off; |
198 | 198 | ||
199 | pdata = plat->sysctrl; | 199 | pdata = plat->sysctrl; |
@@ -228,6 +228,10 @@ static int ab8500_sysctrl_probe(struct platform_device *pdev) | |||
228 | static int ab8500_sysctrl_remove(struct platform_device *pdev) | 228 | static int ab8500_sysctrl_remove(struct platform_device *pdev) |
229 | { | 229 | { |
230 | sysctrl_dev = NULL; | 230 | sysctrl_dev = NULL; |
231 | |||
232 | if (pm_power_off == ab8500_power_off) | ||
233 | pm_power_off = NULL; | ||
234 | |||
231 | return 0; | 235 | return 0; |
232 | } | 236 | } |
233 | 237 | ||