summaryrefslogtreecommitdiffstats
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)
bool fmstatus = true;
if (!(tuner_status & TUNER_PRESENCE_CHECKED))
- fmstatus = tuner_power_nolock(true);
+ fmstatus = tuner_power(true);
val = (tuner_status & TUNER_PRESENT) != 0;
if (!fmstatus)
- tuner_power_nolock(false);
+ tuner_power(false);
break;
}
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);
#if CONFIG_TUNER
bool tuner_power(bool status);
-bool tuner_power_nolock(bool status);
#endif
#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)
}
#if CONFIG_TUNER
+
/** Tuner **/
static bool powered = false;
-bool tuner_power_nolock(bool status)
+bool tuner_power(bool status)
{
bool old_status;
+ lv24020lp_lock();
old_status = powered;
@@ -128,16 +130,8 @@ bool tuner_power_nolock(bool status)
powered = status;
}
- return old_status;
-}
-
-bool tuner_power(bool status)
-{
- bool old_status;
- lv24020lp_lock();
- old_status = tuner_power_nolock(status);
lv24020lp_unlock();
return old_status;
}
-#endif
+#endif /* CONFIG_TUNER */