diff options
author | Mark A. Greer <mgreer@animalcreek.com> | 2014-09-02 18:12:40 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-09-07 17:13:45 -0400 |
commit | cfc708dbe4022324bcd2bcb5817dd29f1f91299d (patch) | |
tree | 79827bcc8eb985213dc70459b0b55c7d7e01bacc /drivers/nfc | |
parent | 307e5caf6fb1dac1b9cfa1d78138d77e46517b56 (diff) |
NFC: trf7970a: Don't turn off RF if its already off
Don't try to turn off of RF transmitter is its
already off.
Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r-- | drivers/nfc/trf7970a.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c index e4671e54424a..429146b7e6d8 100644 --- a/drivers/nfc/trf7970a.c +++ b/drivers/nfc/trf7970a.c | |||
@@ -859,6 +859,10 @@ err_out: | |||
859 | 859 | ||
860 | static void trf7970a_switch_rf_off(struct trf7970a *trf) | 860 | static void trf7970a_switch_rf_off(struct trf7970a *trf) |
861 | { | 861 | { |
862 | if ((trf->state == TRF7970A_ST_PWR_OFF) || | ||
863 | (trf->state == TRF7970A_ST_RF_OFF)) | ||
864 | return; | ||
865 | |||
862 | dev_dbg(trf->dev, "Switching rf off\n"); | 866 | dev_dbg(trf->dev, "Switching rf off\n"); |
863 | 867 | ||
864 | trf->chip_status_ctrl &= ~TRF7970A_CHIP_STATUS_RF_ON; | 868 | trf->chip_status_ctrl &= ~TRF7970A_CHIP_STATUS_RF_ON; |