Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156220
b: refs/heads/master
c: 4bc5d34
h: refs/heads/master
v: v3
  • Loading branch information
Dave Jones committed Aug 4, 2009
1 parent 7205e66 commit 71bfbd4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d5194decd0a6f792b2789eebd4ddf022a248f655
refs/heads/master: 4bc5d34135039566b8d6efa2de7515b2be505da8
21 changes: 19 additions & 2 deletions trunk/drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1248,13 +1248,22 @@ EXPORT_SYMBOL(cpufreq_get);

static int cpufreq_suspend(struct sys_device *sysdev, pm_message_t pmsg)
{
int cpu = sysdev->id;
int ret = 0;

#ifdef __powerpc__
int cpu = sysdev->id;
unsigned int cur_freq = 0;
struct cpufreq_policy *cpu_policy;

dprintk("suspending cpu %u\n", cpu);

/*
* This whole bogosity is here because Powerbooks are made of fail.
* No sane platform should need any of the code below to be run.
* (it's entirely the wrong thing to do, as driver->get may
* reenable interrupts on some architectures).
*/

if (!cpu_online(cpu))
return 0;

Expand Down Expand Up @@ -1313,6 +1322,7 @@ static int cpufreq_suspend(struct sys_device *sysdev, pm_message_t pmsg)

out:
cpufreq_cpu_put(cpu_policy);
#endif /* __powerpc__ */
return ret;
}

Expand All @@ -1326,12 +1336,18 @@ static int cpufreq_suspend(struct sys_device *sysdev, pm_message_t pmsg)
*/
static int cpufreq_resume(struct sys_device *sysdev)
{
int cpu = sysdev->id;
int ret = 0;

#ifdef __powerpc__
int cpu = sysdev->id;
struct cpufreq_policy *cpu_policy;

dprintk("resuming cpu %u\n", cpu);

/* As with the ->suspend method, all the code below is
* only necessary because Powerbooks suck.
* See commit 42d4dc3f4e1e for jokes. */

if (!cpu_online(cpu))
return 0;

Expand Down Expand Up @@ -1395,6 +1411,7 @@ static int cpufreq_resume(struct sys_device *sysdev)
schedule_work(&cpu_policy->update);
fail:
cpufreq_cpu_put(cpu_policy);
#endif /* __powerpc__ */
return ret;
}

Expand Down

0 comments on commit 71bfbd4

Please sign in to comment.