All of lore.kernel.org
 help / color / mirror / Atom feed
* cpufreq_set_policy removed
@ 2007-06-06 21:42 Tony Breeds
  2007-06-06 23:01 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 8+ messages in thread
From: Tony Breeds @ 2007-06-06 21:42 UTC (permalink / raw)
  To: davej; +Cc: cpufreq

Hi All,
	The git commit  632786ce9ff6206951ee4c84fe5c0d5c1d12f4cc reomved
the "deprecated and buggy" cpufreq_set_policy().  In the linux powerpc
tree we have a driver that's using it.

Offending function:
---
static void cbe_cpufreq_handle_pmi(struct of_device *dev, pmi_message_t pmi_msg)
{
	struct cpufreq_policy policy;
	u8 cpu;
	u8 cbe_pmode_new;

	BUG_ON(pmi_msg.type != PMI_TYPE_FREQ_CHANGE);

	cpu = cbe_node_to_cpu(pmi_msg.data1);
	cbe_pmode_new = pmi_msg.data2;

	cpufreq_get_policy(&policy, cpu);

	policy.max = min(policy.max, cbe_freqs[cbe_pmode_new].frequency);
	policy.min = min(policy.min, policy.max);

	pr_debug("cbe_handle_pmi: new policy.min=%d policy.max=%d\n", policy.min, policy.max);
	cpufreq_set_policy(&policy);
}
---

What is the correct API to use now?

Yours Tony

  linux.conf.au        http://linux.conf.au/ || http://lca2008.linux.org.au/
  Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-06-23 17:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-06 21:42 cpufreq_set_policy removed Tony Breeds
2007-06-06 23:01 ` Benjamin Herrenschmidt
2007-06-06 23:13   ` Dave Jones
2007-06-07  1:03     ` Tony Breeds
2007-06-15 17:45     ` Klaus.K Pedersen (Nokia-M/Helsinki)
2007-06-19 12:14       ` Thomas Renninger
2007-06-20 21:20         ` Myron Stowe
2007-06-23 17:32           ` Thomas Renninger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.