diff options
author | Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> | 2015-11-24 10:31:57 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2015-11-30 23:08:07 +0300 |
commit | 948c58a03a4c63edc1007c222c340003fdba6d98 (patch) | |
tree | 2e5d95c830ec0ae351b2f3336eb199eb49f04f5d /drivers/i2c/busses/i2c-cadence.c | |
parent | 7fa32329ca03148fb2c07b4ef3247b8fc0488d6a (diff) | |
download | linux-948c58a03a4c63edc1007c222c340003fdba6d98.tar.xz |
i2c: cadence: Remove the suspended flag
The suspended flag is a flag holding the device's PM status.
The runtime framework does that for us.
Use pm_runtime_suspended call instead.
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-cadence.c')
-rw-r--r-- | drivers/i2c/busses/i2c-cadence.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/i2c/busses/i2c-cadence.c b/drivers/i2c/busses/i2c-cadence.c index d54ad46afa2b..6b08d1607b7a 100644 --- a/drivers/i2c/busses/i2c-cadence.c +++ b/drivers/i2c/busses/i2c-cadence.c @@ -131,7 +131,6 @@ * @xfer_done: Transfer complete status * @p_send_buf: Pointer to transmit buffer * @p_recv_buf: Pointer to receive buffer - * @suspended: Flag holding the device's PM status * @send_count: Number of bytes still expected to send * @recv_count: Number of bytes still expected to receive * @curr_recv_count: Number of bytes to be received in current transfer @@ -152,7 +151,6 @@ struct cdns_i2c { struct completion xfer_done; unsigned char *p_send_buf; unsigned char *p_recv_buf; - u8 suspended; unsigned int send_count; unsigned int recv_count; unsigned int curr_recv_count; @@ -776,7 +774,7 @@ static int cdns_i2c_clk_notifier_cb(struct notifier_block *nb, unsigned long struct clk_notifier_data *ndata = data; struct cdns_i2c *id = to_cdns_i2c(nb); - if (id->suspended) + if (pm_runtime_suspended(id->dev)) return NOTIFY_OK; switch (event) { @@ -830,7 +828,6 @@ static int __maybe_unused cdns_i2c_runtime_suspend(struct device *dev) struct cdns_i2c *xi2c = platform_get_drvdata(pdev); clk_disable(xi2c->clk); - xi2c->suspended = 1; return 0; } @@ -855,8 +852,6 @@ static int __maybe_unused cdns_i2c_runtime_resume(struct device *dev) return ret; } - xi2c->suspended = 0; - return 0; } |