Commit f2f459ca authored by Gilad Ben-Yossef's avatar Gilad Ben-Yossef Committed by Greg Kroah-Hartman

staging: ccree: Replace CONFIG_PM_RUNTIME with CONFIG_PM

After commit b2b49ccb
("PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected")
PM_RUNTIME is always set if PM is set, so #ifdef blocks
depending on CONFIG_PM_RUNTIME may now be changed to depend on
CONFIG_PM.

Replace CONFIG_PM_RUNTIME with CONFIG_PM.
Signed-off-by: default avatarGilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1eccfc44
...@@ -495,13 +495,13 @@ static int cc7x_remove(struct platform_device *plat_dev) ...@@ -495,13 +495,13 @@ static int cc7x_remove(struct platform_device *plat_dev)
return 0; return 0;
} }
#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) #if defined(CONFIG_PM)
static const struct dev_pm_ops arm_cc7x_driver_pm = { static const struct dev_pm_ops arm_cc7x_driver_pm = {
SET_RUNTIME_PM_OPS(cc_pm_suspend, cc_pm_resume, NULL) SET_RUNTIME_PM_OPS(cc_pm_suspend, cc_pm_resume, NULL)
}; };
#endif #endif
#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) #if defined(CONFIG_PM)
#define DX_DRIVER_RUNTIME_PM (&arm_cc7x_driver_pm) #define DX_DRIVER_RUNTIME_PM (&arm_cc7x_driver_pm)
#else #else
#define DX_DRIVER_RUNTIME_PM NULL #define DX_DRIVER_RUNTIME_PM NULL
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "ssi_hash.h" #include "ssi_hash.h"
#include "ssi_pm.h" #include "ssi_pm.h"
#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) #if defined(CONFIG_PM)
#define POWER_DOWN_ENABLE 0x01 #define POWER_DOWN_ENABLE 0x01
#define POWER_DOWN_DISABLE 0x00 #define POWER_DOWN_DISABLE 0x00
...@@ -119,7 +119,7 @@ int cc_pm_put_suspend(struct device *dev) ...@@ -119,7 +119,7 @@ int cc_pm_put_suspend(struct device *dev)
int cc_pm_init(struct ssi_drvdata *drvdata) int cc_pm_init(struct ssi_drvdata *drvdata)
{ {
int rc = 0; int rc = 0;
#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) #if defined(CONFIG_PM)
struct device *dev = drvdata_to_dev(drvdata); struct device *dev = drvdata_to_dev(drvdata);
/* must be before the enabling to avoid resdundent suspending */ /* must be before the enabling to avoid resdundent suspending */
...@@ -137,7 +137,7 @@ int cc_pm_init(struct ssi_drvdata *drvdata) ...@@ -137,7 +137,7 @@ int cc_pm_init(struct ssi_drvdata *drvdata)
void cc_pm_fini(struct ssi_drvdata *drvdata) void cc_pm_fini(struct ssi_drvdata *drvdata)
{ {
#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) #if defined(CONFIG_PM)
pm_runtime_disable(drvdata_to_dev(drvdata)); pm_runtime_disable(drvdata_to_dev(drvdata));
#endif #endif
} }
...@@ -29,7 +29,7 @@ int cc_pm_init(struct ssi_drvdata *drvdata); ...@@ -29,7 +29,7 @@ int cc_pm_init(struct ssi_drvdata *drvdata);
void cc_pm_fini(struct ssi_drvdata *drvdata); void cc_pm_fini(struct ssi_drvdata *drvdata);
#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) #if defined(CONFIG_PM)
int cc_pm_suspend(struct device *dev); int cc_pm_suspend(struct device *dev);
int cc_pm_resume(struct device *dev); int cc_pm_resume(struct device *dev);
......
...@@ -58,7 +58,7 @@ struct ssi_request_mgr_handle { ...@@ -58,7 +58,7 @@ struct ssi_request_mgr_handle {
#else #else
struct tasklet_struct comptask; struct tasklet_struct comptask;
#endif #endif
#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) #if defined(CONFIG_PM)
bool is_runtime_suspended; bool is_runtime_suspended;
#endif #endif
}; };
...@@ -277,7 +277,7 @@ int send_request( ...@@ -277,7 +277,7 @@ int send_request(
SSI_IVPOOL_SEQ_LEN) + SSI_IVPOOL_SEQ_LEN) +
(!is_dout ? 1 : 0)); (!is_dout ? 1 : 0));
#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) #if defined(CONFIG_PM)
rc = cc_pm_get(dev); rc = cc_pm_get(dev);
if (rc) { if (rc) {
dev_err(dev, "ssi_power_mgr_runtime_get returned %x\n", rc); dev_err(dev, "ssi_power_mgr_runtime_get returned %x\n", rc);
...@@ -304,7 +304,7 @@ int send_request( ...@@ -304,7 +304,7 @@ int send_request(
/* Any error other than HW queue full /* Any error other than HW queue full
* (SW queue is full) * (SW queue is full)
*/ */
#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) #if defined(CONFIG_PM)
cc_pm_put_suspend(dev); cc_pm_put_suspend(dev);
#endif #endif
return rc; return rc;
...@@ -340,7 +340,7 @@ int send_request( ...@@ -340,7 +340,7 @@ int send_request(
if (unlikely(rc)) { if (unlikely(rc)) {
dev_err(dev, "Failed to generate IV (rc=%d)\n", rc); dev_err(dev, "Failed to generate IV (rc=%d)\n", rc);
spin_unlock_bh(&req_mgr_h->hw_lock); spin_unlock_bh(&req_mgr_h->hw_lock);
#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) #if defined(CONFIG_PM)
cc_pm_put_suspend(dev); cc_pm_put_suspend(dev);
#endif #endif
return rc; return rc;
...@@ -469,7 +469,7 @@ static void proc_completions(struct ssi_drvdata *drvdata) ...@@ -469,7 +469,7 @@ static void proc_completions(struct ssi_drvdata *drvdata)
struct device *dev = drvdata_to_dev(drvdata); struct device *dev = drvdata_to_dev(drvdata);
struct ssi_request_mgr_handle *request_mgr_handle = struct ssi_request_mgr_handle *request_mgr_handle =
drvdata->request_mgr_handle; drvdata->request_mgr_handle;
#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) #if defined(CONFIG_PM)
int rc = 0; int rc = 0;
#endif #endif
...@@ -513,7 +513,7 @@ static void proc_completions(struct ssi_drvdata *drvdata) ...@@ -513,7 +513,7 @@ static void proc_completions(struct ssi_drvdata *drvdata)
request_mgr_handle->req_queue_tail); request_mgr_handle->req_queue_tail);
dev_dbg(dev, "Request completed. axi_completed=%d\n", dev_dbg(dev, "Request completed. axi_completed=%d\n",
request_mgr_handle->axi_completed); request_mgr_handle->axi_completed);
#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) #if defined(CONFIG_PM)
rc = cc_pm_put_suspend(dev); rc = cc_pm_put_suspend(dev);
if (rc) if (rc)
dev_err(dev, "Failed to set runtime suspension %d\n", dev_err(dev, "Failed to set runtime suspension %d\n",
...@@ -579,7 +579,7 @@ static void comp_handler(unsigned long devarg) ...@@ -579,7 +579,7 @@ static void comp_handler(unsigned long devarg)
* resume the queue configuration - no need to take the lock as this happens inside * resume the queue configuration - no need to take the lock as this happens inside
* the spin lock protection * the spin lock protection
*/ */
#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) #if defined(CONFIG_PM)
int cc_resume_req_queue(struct ssi_drvdata *drvdata) int cc_resume_req_queue(struct ssi_drvdata *drvdata)
{ {
struct ssi_request_mgr_handle *request_mgr_handle = drvdata->request_mgr_handle; struct ssi_request_mgr_handle *request_mgr_handle = drvdata->request_mgr_handle;
......
...@@ -49,7 +49,7 @@ void complete_request(struct ssi_drvdata *drvdata); ...@@ -49,7 +49,7 @@ void complete_request(struct ssi_drvdata *drvdata);
void request_mgr_fini(struct ssi_drvdata *drvdata); void request_mgr_fini(struct ssi_drvdata *drvdata);
#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) #if defined(CONFIG_PM)
int cc_resume_req_queue(struct ssi_drvdata *drvdata); int cc_resume_req_queue(struct ssi_drvdata *drvdata);
int cc_suspend_req_queue(struct ssi_drvdata *drvdata); int cc_suspend_req_queue(struct ssi_drvdata *drvdata);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment