forked from len0rd/rockbox
e200/c200: Take advantage of mutex recursion for the tuner driver and dump the awkward *_nolock stuff.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15468 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
bdfe87c0f1
commit
f29c4ccc6a
3 changed files with 6 additions and 13 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ bool spdif_powered(void);
|
|||
|
||||
#if CONFIG_TUNER
|
||||
bool tuner_power(bool status);
|
||||
bool tuner_power_nolock(bool status);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue