diff options
author | Mark A. Greer <mgreer@animalcreek.com> | 2014-03-25 11:54:39 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-04-21 18:37:28 -0400 |
commit | 18422e686ef043b9abe004326ac9ffa1e38b81ec (patch) | |
tree | e6131b39c66c57ceb2b2adf4f8b92454875c11b2 /drivers/nfc | |
parent | e6403b7c756f9d694332870ba0c2be7a4aa0b8c0 (diff) |
NFC: trf7970a: Don't return value from trf7970a_switch_rf_on()
trf7970a_switch_rf_on() no longer returns anything other than 0 so make
it void and clean up the code that checks for errors when its called.
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 | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c index 26e744934068..8744a556fbd1 100644 --- a/drivers/nfc/trf7970a.c +++ b/drivers/nfc/trf7970a.c | |||
@@ -804,21 +804,18 @@ static void trf7970a_switch_rf_off(struct trf7970a *trf) | |||
804 | pm_runtime_put_autosuspend(trf->dev); | 804 | pm_runtime_put_autosuspend(trf->dev); |
805 | } | 805 | } |
806 | 806 | ||
807 | static int trf7970a_switch_rf_on(struct trf7970a *trf) | 807 | static void trf7970a_switch_rf_on(struct trf7970a *trf) |
808 | { | 808 | { |
809 | dev_dbg(trf->dev, "Switching rf on\n"); | 809 | dev_dbg(trf->dev, "Switching rf on\n"); |
810 | 810 | ||
811 | pm_runtime_get_sync(trf->dev); | 811 | pm_runtime_get_sync(trf->dev); |
812 | 812 | ||
813 | trf->state = TRF7970A_ST_IDLE; | 813 | trf->state = TRF7970A_ST_IDLE; |
814 | |||
815 | return 0; | ||
816 | } | 814 | } |
817 | 815 | ||
818 | static int trf7970a_switch_rf(struct nfc_digital_dev *ddev, bool on) | 816 | static int trf7970a_switch_rf(struct nfc_digital_dev *ddev, bool on) |
819 | { | 817 | { |
820 | struct trf7970a *trf = nfc_digital_get_drvdata(ddev); | 818 | struct trf7970a *trf = nfc_digital_get_drvdata(ddev); |
821 | int ret = 0; | ||
822 | 819 | ||
823 | dev_dbg(trf->dev, "Switching RF - state: %d, on: %d\n", trf->state, on); | 820 | dev_dbg(trf->dev, "Switching RF - state: %d, on: %d\n", trf->state, on); |
824 | 821 | ||
@@ -827,7 +824,7 @@ static int trf7970a_switch_rf(struct nfc_digital_dev *ddev, bool on) | |||
827 | if (on) { | 824 | if (on) { |
828 | switch (trf->state) { | 825 | switch (trf->state) { |
829 | case TRF7970A_ST_OFF: | 826 | case TRF7970A_ST_OFF: |
830 | ret = trf7970a_switch_rf_on(trf); | 827 | trf7970a_switch_rf_on(trf); |
831 | break; | 828 | break; |
832 | case TRF7970A_ST_IDLE: | 829 | case TRF7970A_ST_IDLE: |
833 | case TRF7970A_ST_IDLE_RX_BLOCKED: | 830 | case TRF7970A_ST_IDLE_RX_BLOCKED: |
@@ -852,7 +849,7 @@ static int trf7970a_switch_rf(struct nfc_digital_dev *ddev, bool on) | |||
852 | } | 849 | } |
853 | 850 | ||
854 | mutex_unlock(&trf->lock); | 851 | mutex_unlock(&trf->lock); |
855 | return ret; | 852 | return 0; |
856 | } | 853 | } |
857 | 854 | ||
858 | static int trf7970a_config_rf_tech(struct trf7970a *trf, int tech) | 855 | static int trf7970a_config_rf_tech(struct trf7970a *trf, int tech) |
@@ -943,17 +940,14 @@ static int trf7970a_in_configure_hw(struct nfc_digital_dev *ddev, int type, | |||
943 | int param) | 940 | int param) |
944 | { | 941 | { |
945 | struct trf7970a *trf = nfc_digital_get_drvdata(ddev); | 942 | struct trf7970a *trf = nfc_digital_get_drvdata(ddev); |
946 | int ret = 0; | 943 | int ret; |
947 | 944 | ||
948 | dev_dbg(trf->dev, "Configure hw - type: %d, param: %d\n", type, param); | 945 | dev_dbg(trf->dev, "Configure hw - type: %d, param: %d\n", type, param); |
949 | 946 | ||
950 | mutex_lock(&trf->lock); | 947 | mutex_lock(&trf->lock); |
951 | 948 | ||
952 | if (trf->state == TRF7970A_ST_OFF) { | 949 | if (trf->state == TRF7970A_ST_OFF) |
953 | ret = trf7970a_switch_rf_on(trf); | 950 | trf7970a_switch_rf_on(trf); |
954 | if (ret) | ||
955 | goto err_out; | ||
956 | } | ||
957 | 951 | ||
958 | switch (type) { | 952 | switch (type) { |
959 | case NFC_DIGITAL_CONFIG_RF_TECH: | 953 | case NFC_DIGITAL_CONFIG_RF_TECH: |
@@ -967,7 +961,6 @@ static int trf7970a_in_configure_hw(struct nfc_digital_dev *ddev, int type, | |||
967 | ret = -EINVAL; | 961 | ret = -EINVAL; |
968 | } | 962 | } |
969 | 963 | ||
970 | err_out: | ||
971 | mutex_unlock(&trf->lock); | 964 | mutex_unlock(&trf->lock); |
972 | return ret; | 965 | return ret; |
973 | } | 966 | } |