From 3db617e77ae2f8051fd6f5d3fff0e15f086d5b4c Mon Sep 17 00:00:00 2001 From: Ofir Drang Date: Mon, 17 Jun 2019 11:46:29 +0300 Subject: crypto: ccree - prevent isr handling in case driver is suspended ccree irq may be shared with other devices, in order to prevent ccree isr handling while device maybe suspended we added a check to verify that the device is not suspended. Signed-off-by: Ofir Drang Signed-off-by: Herbert Xu --- drivers/crypto/ccree/cc_pm.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/crypto/ccree/cc_pm.h') diff --git a/drivers/crypto/ccree/cc_pm.h b/drivers/crypto/ccree/cc_pm.h index 6190cdba5dad..a7d98a5da2e1 100644 --- a/drivers/crypto/ccree/cc_pm.h +++ b/drivers/crypto/ccree/cc_pm.h @@ -22,6 +22,7 @@ int cc_pm_suspend(struct device *dev); int cc_pm_resume(struct device *dev); int cc_pm_get(struct device *dev); int cc_pm_put_suspend(struct device *dev); +bool cc_pm_is_dev_suspended(struct device *dev); #else @@ -54,6 +55,12 @@ static inline int cc_pm_put_suspend(struct device *dev) return 0; } +static inline bool cc_pm_is_dev_suspended(struct device *dev) +{ + /* if PM not supported device is never suspend */ + return false; +} + #endif #endif /*__POWER_MGR_H__*/ -- cgit v1.2.3-55-g7522