summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/drivers/tuner/lv24020lp.c4
-rw-r--r--firmware/export/power.h1
-rw-r--r--firmware/target/arm/sandisk/power-c200_e200.c14
3 files changed, 6 insertions, 13 deletions
diff --git a/firmware/drivers/tuner/lv24020lp.c b/firmware/drivers/tuner/lv24020lp.c
index b28b0ede3f..92ea7ade39 100644
--- a/firmware/drivers/tuner/lv24020lp.c
+++ b/firmware/drivers/tuner/lv24020lp.c
@@ -914,12 +914,12 @@ int lv24020lp_get(int setting)
914 bool fmstatus = true; 914 bool fmstatus = true;
915 915
916 if (!(tuner_status & TUNER_PRESENCE_CHECKED)) 916 if (!(tuner_status & TUNER_PRESENCE_CHECKED))
917 fmstatus = tuner_power_nolock(true); 917 fmstatus = tuner_power(true);
918 918
919 val = (tuner_status & TUNER_PRESENT) != 0; 919 val = (tuner_status & TUNER_PRESENT) != 0;
920 920
921 if (!fmstatus) 921 if (!fmstatus)
922 tuner_power_nolock(false); 922 tuner_power(false);
923 break; 923 break;
924 } 924 }
925 925
diff --git a/firmware/export/power.h b/firmware/export/power.h
index 7c0ed3df89..a78a1eec78 100644
--- a/firmware/export/power.h
+++ b/firmware/export/power.h
@@ -49,7 +49,6 @@ bool spdif_powered(void);
49 49
50#if CONFIG_TUNER 50#if CONFIG_TUNER
51bool tuner_power(bool status); 51bool tuner_power(bool status);
52bool tuner_power_nolock(bool status);
53#endif 52#endif
54 53
55#endif 54#endif
diff --git a/firmware/target/arm/sandisk/power-c200_e200.c b/firmware/target/arm/sandisk/power-c200_e200.c
index da86d97d26..40aa792dce 100644
--- a/firmware/target/arm/sandisk/power-c200_e200.c
+++ b/firmware/target/arm/sandisk/power-c200_e200.c
@@ -69,12 +69,14 @@ void ide_power_enable(bool on)
69} 69}
70 70
71#if CONFIG_TUNER 71#if CONFIG_TUNER
72
72/** Tuner **/ 73/** Tuner **/
73static bool powered = false; 74static bool powered = false;
74 75
75bool tuner_power_nolock(bool status) 76bool tuner_power(bool status)
76{ 77{
77 bool old_status; 78 bool old_status;
79 lv24020lp_lock();
78 80
79 old_status = powered; 81 old_status = powered;
80 82
@@ -128,16 +130,8 @@ bool tuner_power_nolock(bool status)
128 powered = status; 130 powered = status;
129 } 131 }
130 132
131 return old_status;
132}
133
134bool tuner_power(bool status)
135{
136 bool old_status;
137 lv24020lp_lock();
138 old_status = tuner_power_nolock(status);
139 lv24020lp_unlock(); 133 lv24020lp_unlock();
140 return old_status; 134 return old_status;
141} 135}
142 136
143#endif 137#endif /* CONFIG_TUNER */