summaryrefslogtreecommitdiff
path: root/include/linux/mfd
diff options
context:
space:
mode:
authorStefan Mavrodiev <stefan@olimex.com>2019-06-07 15:42:25 +0300
committerLee Jones <lee.jones@linaro.org>2019-07-02 12:11:31 +0100
commit76304994645028accc0cfe287652344b696f4470 (patch)
tree594b62dc81e1c3efa627236786a733511367655a /include/linux/mfd
parent554e937ec8d75930bc711612208af27961e3dc61 (diff)
mfd: rk808: Check pm_power_off pointer
The function pointer pm_power_off may point to function from other module (PSCI for example). If rk808 is removed, pm_power_off is overwritten to NULL and the system cannot be powered off. This patch checks if pm_power_off points to a module function. Signed-off-by: Stefan Mavrodiev <stefan@olimex.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include/linux/mfd')
-rw-r--r--include/linux/mfd/rk808.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mfd/rk808.h b/include/linux/mfd/rk808.h
index 2a9cd01691b2..286316375636 100644
--- a/include/linux/mfd/rk808.h
+++ b/include/linux/mfd/rk808.h
@@ -628,5 +628,6 @@ struct rk808 {
long variant;
const struct regmap_config *regmap_cfg;
const struct regmap_irq_chip *regmap_irq_chip;
+ void (*pm_pwroff_fn)(void);
};
#endif /* __LINUX_REGULATOR_RK808_H */