Sansa AMS: make set_cpu_frequency() handle frequency 0

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19240 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rafaël Carré 2008-11-26 23:19:13 +00:00
parent ef6b49815b
commit 4e4b1d00f9

View file

@ -270,7 +270,7 @@ int system_memory_guard(int newmode)
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
void set_cpu_frequency(long frequency)
{
int divider = CPUFREQ_MAX / frequency;
int divider = frequency ? (CPUFREQ_MAX / frequency) : 16 /* minimal */ ;
if(divider > 16)
divider = 16;