]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
crypto: ccree - remove cc_pm_is_dev_suspended() wrapper
authorGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 11 Feb 2020 18:19:10 +0000 (19:19 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 22 Feb 2020 01:25:44 +0000 (09:25 +0800)
If CONFIG_PM=y, cc_pm_is_dev_suspended() is just a wrapper around
pm_runtime_suspended().
If CONFIG_PM=n, cc_pm_is_dev_suspended() a dummy that behaves exactly
the same as the dummy for pm_runtime_suspended().

Hence remove cc_pm_is_dev_suspended(), and call pm_runtime_suspended()
directly.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccree/cc_driver.c
drivers/crypto/ccree/cc_pm.c
drivers/crypto/ccree/cc_pm.h

index e365ede32cc0e6a01bc90901f72c6c51b9f08064..02442596310cd98da0180506b80625c2cc22227f 100644 (file)
@@ -136,7 +136,7 @@ static irqreturn_t cc_isr(int irq, void *dev_id)
 
        /* STAT_OP_TYPE_GENERIC STAT_PHASE_0: Interrupt */
        /* if driver suspended return, probably shared interrupt */
-       if (cc_pm_is_dev_suspended(dev))
+       if (pm_runtime_suspended(dev))
                return IRQ_NONE;
 
        /* read the interrupt status */
index f7729fc1ee597e9aaee1349271b4c344a63a4d1b..3b4927c41a177752556682c1c5b187736b46fb6b 100644 (file)
@@ -74,9 +74,3 @@ void cc_pm_put_suspend(struct device *dev)
        pm_runtime_mark_last_busy(dev);
        pm_runtime_put_autosuspend(dev);
 }
-
-bool cc_pm_is_dev_suspended(struct device *dev)
-{
-       /* check device state using runtime api */
-       return pm_runtime_suspended(dev);
-}
index 2dcf53fa108e77a698003dbc562b520e25db4219..1fe1fc827f62f49e97588116cd3bc057dfac251f 100644 (file)
@@ -19,7 +19,6 @@ int cc_pm_suspend(struct device *dev);
 int cc_pm_resume(struct device *dev);
 int cc_pm_get(struct device *dev);
 void cc_pm_put_suspend(struct device *dev);
-bool cc_pm_is_dev_suspended(struct device *dev);
 
 #else
 
@@ -30,12 +29,6 @@ static inline int cc_pm_get(struct device *dev)
 
 static inline void cc_pm_put_suspend(struct device *dev) {}
 
-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__*/