Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 211443
b: refs/heads/master
c: a7abda8
h: refs/heads/master
i:
  211441: 5a74b0d
  211439: 80c80e8
v: v3
  • Loading branch information
minskey guo authored and Matthew Garrett committed Oct 5, 2010
1 parent 1e97ed8 commit ef9e192
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 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: fed522f7ea780d195d5d3e55df95fee520136e17
refs/heads/master: a7abda8d721359363d679c5f2de964f29419568c
22 changes: 13 additions & 9 deletions trunk/drivers/platform/x86/intel_ips.c
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,6 @@ static int ips_monitor(void *data)
kfree(mch_samples);
kfree(cpu_samples);
kfree(mchp_samples);
kthread_stop(ips->adjust);
return -ENOMEM;
}

Expand Down Expand Up @@ -1535,19 +1534,24 @@ static int ips_probe(struct pci_dev *dev, const struct pci_device_id *id)
ips_enable_cpu_turbo(ips);
ips->cpu_turbo_enabled = true;

/* Set up the work queue and monitor/adjust threads */
ips->monitor = kthread_run(ips_monitor, ips, "ips-monitor");
if (IS_ERR(ips->monitor)) {
/* Create thermal adjust thread */
ips->adjust = kthread_create(ips_adjust, ips, "ips-adjust");
if (IS_ERR(ips->adjust)) {
dev_err(&dev->dev,
"failed to create thermal monitor thread, aborting\n");
"failed to create thermal adjust thread, aborting\n");
ret = -ENOMEM;
goto error_free_irq;

}

ips->adjust = kthread_create(ips_adjust, ips, "ips-adjust");
if (IS_ERR(ips->adjust)) {
/*
* Set up the work queue and monitor thread. The monitor thread
* will wake up ips_adjust thread.
*/
ips->monitor = kthread_run(ips_monitor, ips, "ips-monitor");
if (IS_ERR(ips->monitor)) {
dev_err(&dev->dev,
"failed to create thermal adjust thread, aborting\n");
"failed to create thermal monitor thread, aborting\n");
ret = -ENOMEM;
goto error_thread_cleanup;
}
Expand All @@ -1566,7 +1570,7 @@ static int ips_probe(struct pci_dev *dev, const struct pci_device_id *id)
return ret;

error_thread_cleanup:
kthread_stop(ips->monitor);
kthread_stop(ips->adjust);
error_free_irq:
free_irq(ips->dev->irq, ips);
error_unmap:
Expand Down

0 comments on commit ef9e192

Please sign in to comment.