diff options
Diffstat (limited to 'drivers/nfc/trf7970a.c')
-rw-r--r-- | drivers/nfc/trf7970a.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c index 9c0549d4f276..ce9686c44350 100644 --- a/drivers/nfc/trf7970a.c +++ b/drivers/nfc/trf7970a.c | |||
@@ -823,10 +823,18 @@ static void trf7970a_switch_rf_off(struct trf7970a *trf) | |||
823 | 823 | ||
824 | static void trf7970a_switch_rf_on(struct trf7970a *trf) | 824 | static void trf7970a_switch_rf_on(struct trf7970a *trf) |
825 | { | 825 | { |
826 | int ret; | ||
827 | |||
826 | dev_dbg(trf->dev, "Switching rf on\n"); | 828 | dev_dbg(trf->dev, "Switching rf on\n"); |
827 | 829 | ||
828 | pm_runtime_get_sync(trf->dev); | 830 | pm_runtime_get_sync(trf->dev); |
829 | 831 | ||
832 | ret = trf7970a_init(trf); | ||
833 | if (ret) { | ||
834 | dev_err(trf->dev, "%s - Can't initialize: %d\n", __func__, ret); | ||
835 | return; | ||
836 | } | ||
837 | |||
830 | trf->state = TRF7970A_ST_IDLE; | 838 | trf->state = TRF7970A_ST_IDLE; |
831 | } | 839 | } |
832 | 840 | ||
@@ -1473,12 +1481,6 @@ static int trf7970a_pm_runtime_resume(struct device *dev) | |||
1473 | 1481 | ||
1474 | usleep_range(20000, 21000); | 1482 | usleep_range(20000, 21000); |
1475 | 1483 | ||
1476 | ret = trf7970a_init(trf); | ||
1477 | if (ret) { | ||
1478 | dev_err(dev, "%s - Can't initialize: %d\n", __func__, ret); | ||
1479 | return ret; | ||
1480 | } | ||
1481 | |||
1482 | pm_runtime_mark_last_busy(dev); | 1484 | pm_runtime_mark_last_busy(dev); |
1483 | 1485 | ||
1484 | return 0; | 1486 | return 0; |