diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-12-20 17:01:18 -0500 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-12-20 17:01:18 -0500 |
commit | cb85f123cd2393581bcffad335bfc6bcdd58569c (patch) | |
tree | 7b0de48b2a13ca96251c02245ab906f7efa3ac18 /drivers/devfreq/devfreq.c | |
parent | b79d2ff98caee60c07a7598aba3b26acd1655a99 (diff) | |
parent | caca6a03d365883564885f2c1da3e88dcf65d139 (diff) |
Merge commit 'v3.2-rc3' into stable/for-linus-3.3
* commit 'v3.2-rc3': (412 commits)
Linux 3.2-rc3
virtio-pci: make reset operation safer
virtio-mmio: Correct the name of the guest features selector
virtio: add HAS_IOMEM dependency to MMIO platform bus driver
eCryptfs: Extend array bounds for all filename chars
eCryptfs: Flush file in vma close
eCryptfs: Prevent file create race condition
regulator: TPS65910: Fix VDD1/2 voltage selector count
i2c: Make i2cdev_notifier_call static
i2c: Delete ANY_I2C_BUS
i2c: Fix device name for 10-bit slave address
i2c-algo-bit: Generate correct i2c address sequence for 10-bit target
drm: integer overflow in drm_mode_dirtyfb_ioctl()
Revert "of/irq: of_irq_find_parent: check for parent equal to child"
drivers/gpu/vga/vgaarb.c: add missing kfree
drm/radeon/kms/atom: unify i2c gpio table handling
drm/radeon/kms: fix up gpio i2c mask bits for r4xx for real
ttm: Don't return the bo reserved on error path
mount_subtree() pointless use-after-free
iio: fix a leak due to improper use of anon_inode_getfd()
...
Diffstat (limited to 'drivers/devfreq/devfreq.c')
-rw-r--r-- | drivers/devfreq/devfreq.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 5d15b812377b..59d24e9cb8c5 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c | |||
@@ -15,7 +15,9 @@ | |||
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/module.h> | ||
18 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/stat.h> | ||
19 | #include <linux/opp.h> | 21 | #include <linux/opp.h> |
20 | #include <linux/devfreq.h> | 22 | #include <linux/devfreq.h> |
21 | #include <linux/workqueue.h> | 23 | #include <linux/workqueue.h> |
@@ -416,10 +418,14 @@ out: | |||
416 | */ | 418 | */ |
417 | int devfreq_remove_device(struct devfreq *devfreq) | 419 | int devfreq_remove_device(struct devfreq *devfreq) |
418 | { | 420 | { |
421 | bool central_polling; | ||
422 | |||
419 | if (!devfreq) | 423 | if (!devfreq) |
420 | return -EINVAL; | 424 | return -EINVAL; |
421 | 425 | ||
422 | if (!devfreq->governor->no_central_polling) { | 426 | central_polling = !devfreq->governor->no_central_polling; |
427 | |||
428 | if (central_polling) { | ||
423 | mutex_lock(&devfreq_list_lock); | 429 | mutex_lock(&devfreq_list_lock); |
424 | while (wait_remove_device == devfreq) { | 430 | while (wait_remove_device == devfreq) { |
425 | mutex_unlock(&devfreq_list_lock); | 431 | mutex_unlock(&devfreq_list_lock); |
@@ -431,7 +437,7 @@ int devfreq_remove_device(struct devfreq *devfreq) | |||
431 | mutex_lock(&devfreq->lock); | 437 | mutex_lock(&devfreq->lock); |
432 | _remove_devfreq(devfreq, false); /* it unlocks devfreq->lock */ | 438 | _remove_devfreq(devfreq, false); /* it unlocks devfreq->lock */ |
433 | 439 | ||
434 | if (!devfreq->governor->no_central_polling) | 440 | if (central_polling) |
435 | mutex_unlock(&devfreq_list_lock); | 441 | mutex_unlock(&devfreq_list_lock); |
436 | 442 | ||
437 | return 0; | 443 | return 0; |