Another powernow-k6 bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



While looking at your recent powernow-k6 fixes (thanks for those), I
noticed that powernow_k6_cpu_exit() doesn't work properly:

static int powernow_k6_cpu_exit(struct cpufreq_policy *policy)
{
	unsigned int i;
	for (i = 0; i < 8; i++) {
		if (i == max_multiplier)
			powernow_k6_set_state(i);
	}
	cpufreq_frequency_table_put_attr(policy->cpu);
	return 0;
}

As max_multiplier is the actual multiplier * 10, this will never change
the state.  I'm guessing this should be something like:

	for (i = 0; (clock_ratio[i].frequency != CPUFREQ_TABLE_END); i++)
		if (clock_ratio[i].driver_data == max_multiplier)

Ben.

-- 
Ben Hutchings
Kids!  Bringing about Armageddon can be dangerous.  Do not attempt it in
your own home. - Terry Pratchett and Neil Gaiman, `Good Omens'

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Kernel Devel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Forum]     [Linux SCSI]

  Powered by Linux