diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2014-02-19 07:27:47 -0500 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2014-03-05 11:11:01 -0500 |
commit | 624df09f3a20b7073289d7f7d8672734ca1339a9 (patch) | |
tree | f4d180f36ddedc2ccd3ba9717c90963aaaa665b2 | |
parent | bce9f8d620e5aed7c677dabe5fda09a3af3d5216 (diff) |
i2c: nomadik: Remove busy check for transfers at suspend late
We should never be busy performing transfers at suspend late, thus
there are no reason to check for it.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-rw-r--r-- | drivers/i2c/busses/i2c-nomadik.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c index 89f40ea2299d..dfbb800a8a8d 100644 --- a/drivers/i2c/busses/i2c-nomadik.c +++ b/drivers/i2c/busses/i2c-nomadik.c | |||
@@ -167,7 +167,6 @@ struct i2c_nmk_client { | |||
167 | * @stop: stop condition. | 167 | * @stop: stop condition. |
168 | * @xfer_complete: acknowledge completion for a I2C message. | 168 | * @xfer_complete: acknowledge completion for a I2C message. |
169 | * @result: controller propogated result. | 169 | * @result: controller propogated result. |
170 | * @busy: Busy doing transfer. | ||
171 | */ | 170 | */ |
172 | struct nmk_i2c_dev { | 171 | struct nmk_i2c_dev { |
173 | struct i2c_vendor_data *vendor; | 172 | struct i2c_vendor_data *vendor; |
@@ -185,7 +184,6 @@ struct nmk_i2c_dev { | |||
185 | int stop; | 184 | int stop; |
186 | struct completion xfer_complete; | 185 | struct completion xfer_complete; |
187 | int result; | 186 | int result; |
188 | bool busy; | ||
189 | }; | 187 | }; |
190 | 188 | ||
191 | /* controller's abort causes */ | 189 | /* controller's abort causes */ |
@@ -671,8 +669,6 @@ static int nmk_i2c_xfer(struct i2c_adapter *i2c_adap, | |||
671 | struct nmk_i2c_dev *dev = i2c_get_adapdata(i2c_adap); | 669 | struct nmk_i2c_dev *dev = i2c_get_adapdata(i2c_adap); |
672 | int j; | 670 | int j; |
673 | 671 | ||
674 | dev->busy = true; | ||
675 | |||
676 | pm_runtime_get_sync(&dev->adev->dev); | 672 | pm_runtime_get_sync(&dev->adev->dev); |
677 | 673 | ||
678 | /* Attempt three times to send the message queue */ | 674 | /* Attempt three times to send the message queue */ |
@@ -697,8 +693,6 @@ static int nmk_i2c_xfer(struct i2c_adapter *i2c_adap, | |||
697 | 693 | ||
698 | pm_runtime_put_sync(&dev->adev->dev); | 694 | pm_runtime_put_sync(&dev->adev->dev); |
699 | 695 | ||
700 | dev->busy = false; | ||
701 | |||
702 | /* return the no. messages processed */ | 696 | /* return the no. messages processed */ |
703 | if (status) | 697 | if (status) |
704 | return status; | 698 | return status; |
@@ -885,12 +879,6 @@ static irqreturn_t i2c_irq_handler(int irq, void *arg) | |||
885 | #ifdef CONFIG_PM_SLEEP | 879 | #ifdef CONFIG_PM_SLEEP |
886 | static int nmk_i2c_suspend_late(struct device *dev) | 880 | static int nmk_i2c_suspend_late(struct device *dev) |
887 | { | 881 | { |
888 | struct amba_device *adev = to_amba_device(dev); | ||
889 | struct nmk_i2c_dev *nmk_i2c = amba_get_drvdata(adev); | ||
890 | |||
891 | if (nmk_i2c->busy) | ||
892 | return -EBUSY; | ||
893 | |||
894 | pinctrl_pm_select_sleep_state(dev); | 882 | pinctrl_pm_select_sleep_state(dev); |
895 | 883 | ||
896 | return 0; | 884 | return 0; |
@@ -992,7 +980,6 @@ static int nmk_i2c_probe(struct amba_device *adev, const struct amba_id *id) | |||
992 | goto err_no_mem; | 980 | goto err_no_mem; |
993 | } | 981 | } |
994 | dev->vendor = vendor; | 982 | dev->vendor = vendor; |
995 | dev->busy = false; | ||
996 | dev->adev = adev; | 983 | dev->adev = adev; |
997 | nmk_i2c_of_probe(np, dev); | 984 | nmk_i2c_of_probe(np, dev); |
998 | 985 | ||