diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-12-14 07:02:09 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-12-14 07:02:09 -0500 |
commit | 704867ede0c3645075ff3438d1a4fd4977abaa8d (patch) | |
tree | fc89b31764132dc1b07e0af3e53219005cfb8f95 /drivers/base | |
parent | 681ba97d9fbff59f67c71f1d9a88ad0b8ef49d25 (diff) | |
parent | cfe04478fa1b472264b7fe9bbf547710aa344d3c (diff) |
Merge branch 'mfd/da9052' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc into regmap-next
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/core.c | 5 | ||||
-rw-r--r-- | drivers/base/node.c | 14 | ||||
-rw-r--r-- | drivers/base/power/clock_ops.c | 3 | ||||
-rw-r--r-- | drivers/base/power/main.c | 3 | ||||
-rw-r--r-- | drivers/base/power/opp.c | 2 | ||||
-rw-r--r-- | drivers/base/power/qos.c | 18 |
6 files changed, 24 insertions, 21 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 82c865452c70..919daa7cd5b1 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/kallsyms.h> | 22 | #include <linux/kallsyms.h> |
23 | #include <linux/mutex.h> | 23 | #include <linux/mutex.h> |
24 | #include <linux/async.h> | 24 | #include <linux/async.h> |
25 | #include <linux/pm_runtime.h> | ||
25 | 26 | ||
26 | #include "base.h" | 27 | #include "base.h" |
27 | #include "power/power.h" | 28 | #include "power/power.h" |
@@ -1743,6 +1744,10 @@ void device_shutdown(void) | |||
1743 | list_del_init(&dev->kobj.entry); | 1744 | list_del_init(&dev->kobj.entry); |
1744 | spin_unlock(&devices_kset->list_lock); | 1745 | spin_unlock(&devices_kset->list_lock); |
1745 | 1746 | ||
1747 | /* Don't allow any more runtime suspends */ | ||
1748 | pm_runtime_get_noresume(dev); | ||
1749 | pm_runtime_barrier(dev); | ||
1750 | |||
1746 | if (dev->bus && dev->bus->shutdown) { | 1751 | if (dev->bus && dev->bus->shutdown) { |
1747 | dev_dbg(dev, "shutdown\n"); | 1752 | dev_dbg(dev, "shutdown\n"); |
1748 | dev->bus->shutdown(dev); | 1753 | dev->bus->shutdown(dev); |
diff --git a/drivers/base/node.c b/drivers/base/node.c index 793f796c4da3..5693ecee9a40 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c | |||
@@ -127,12 +127,13 @@ static ssize_t node_read_meminfo(struct sys_device * dev, | |||
127 | nid, K(node_page_state(nid, NR_WRITEBACK)), | 127 | nid, K(node_page_state(nid, NR_WRITEBACK)), |
128 | nid, K(node_page_state(nid, NR_FILE_PAGES)), | 128 | nid, K(node_page_state(nid, NR_FILE_PAGES)), |
129 | nid, K(node_page_state(nid, NR_FILE_MAPPED)), | 129 | nid, K(node_page_state(nid, NR_FILE_MAPPED)), |
130 | nid, K(node_page_state(nid, NR_ANON_PAGES) | ||
131 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 130 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
131 | nid, K(node_page_state(nid, NR_ANON_PAGES) | ||
132 | + node_page_state(nid, NR_ANON_TRANSPARENT_HUGEPAGES) * | 132 | + node_page_state(nid, NR_ANON_TRANSPARENT_HUGEPAGES) * |
133 | HPAGE_PMD_NR | 133 | HPAGE_PMD_NR), |
134 | #else | ||
135 | nid, K(node_page_state(nid, NR_ANON_PAGES)), | ||
134 | #endif | 136 | #endif |
135 | ), | ||
136 | nid, K(node_page_state(nid, NR_SHMEM)), | 137 | nid, K(node_page_state(nid, NR_SHMEM)), |
137 | nid, node_page_state(nid, NR_KERNEL_STACK) * | 138 | nid, node_page_state(nid, NR_KERNEL_STACK) * |
138 | THREAD_SIZE / 1024, | 139 | THREAD_SIZE / 1024, |
@@ -143,13 +144,14 @@ static ssize_t node_read_meminfo(struct sys_device * dev, | |||
143 | nid, K(node_page_state(nid, NR_SLAB_RECLAIMABLE) + | 144 | nid, K(node_page_state(nid, NR_SLAB_RECLAIMABLE) + |
144 | node_page_state(nid, NR_SLAB_UNRECLAIMABLE)), | 145 | node_page_state(nid, NR_SLAB_UNRECLAIMABLE)), |
145 | nid, K(node_page_state(nid, NR_SLAB_RECLAIMABLE)), | 146 | nid, K(node_page_state(nid, NR_SLAB_RECLAIMABLE)), |
146 | nid, K(node_page_state(nid, NR_SLAB_UNRECLAIMABLE)) | ||
147 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 147 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
148 | nid, K(node_page_state(nid, NR_SLAB_UNRECLAIMABLE)) | ||
148 | , nid, | 149 | , nid, |
149 | K(node_page_state(nid, NR_ANON_TRANSPARENT_HUGEPAGES) * | 150 | K(node_page_state(nid, NR_ANON_TRANSPARENT_HUGEPAGES) * |
150 | HPAGE_PMD_NR) | 151 | HPAGE_PMD_NR)); |
152 | #else | ||
153 | nid, K(node_page_state(nid, NR_SLAB_UNRECLAIMABLE))); | ||
151 | #endif | 154 | #endif |
152 | ); | ||
153 | n += hugetlb_report_node_meminfo(nid, buf + n); | 155 | n += hugetlb_report_node_meminfo(nid, buf + n); |
154 | return n; | 156 | return n; |
155 | } | 157 | } |
diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c index 5f0f85d5c576..428e55e012dc 100644 --- a/drivers/base/power/clock_ops.c +++ b/drivers/base/power/clock_ops.c | |||
@@ -229,7 +229,8 @@ int pm_clk_suspend(struct device *dev) | |||
229 | 229 | ||
230 | list_for_each_entry_reverse(ce, &psd->clock_list, node) { | 230 | list_for_each_entry_reverse(ce, &psd->clock_list, node) { |
231 | if (ce->status < PCE_STATUS_ERROR) { | 231 | if (ce->status < PCE_STATUS_ERROR) { |
232 | clk_disable(ce->clk); | 232 | if (ce->status == PCE_STATUS_ENABLED) |
233 | clk_disable(ce->clk); | ||
233 | ce->status = PCE_STATUS_ACQUIRED; | 234 | ce->status = PCE_STATUS_ACQUIRED; |
234 | } | 235 | } |
235 | } | 236 | } |
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 7fa098464dae..c3d2dfcf438d 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
@@ -920,7 +920,8 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async) | |||
920 | End: | 920 | End: |
921 | if (!error) { | 921 | if (!error) { |
922 | dev->power.is_suspended = true; | 922 | dev->power.is_suspended = true; |
923 | if (dev->power.wakeup_path && dev->parent) | 923 | if (dev->power.wakeup_path |
924 | && dev->parent && !dev->parent->power.ignore_children) | ||
924 | dev->parent->power.wakeup_path = true; | 925 | dev->parent->power.wakeup_path = true; |
925 | } | 926 | } |
926 | 927 | ||
diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c index 434a6c011675..95706fa24c73 100644 --- a/drivers/base/power/opp.c +++ b/drivers/base/power/opp.c | |||
@@ -669,7 +669,7 @@ struct srcu_notifier_head *opp_get_notifier(struct device *dev) | |||
669 | struct device_opp *dev_opp = find_device_opp(dev); | 669 | struct device_opp *dev_opp = find_device_opp(dev); |
670 | 670 | ||
671 | if (IS_ERR(dev_opp)) | 671 | if (IS_ERR(dev_opp)) |
672 | return ERR_PTR(PTR_ERR(dev_opp)); /* matching type */ | 672 | return ERR_CAST(dev_opp); /* matching type */ |
673 | 673 | ||
674 | return &dev_opp->head; | 674 | return &dev_opp->head; |
675 | } | 675 | } |
diff --git a/drivers/base/power/qos.c b/drivers/base/power/qos.c index 30a94eadc200..86de6c50fc41 100644 --- a/drivers/base/power/qos.c +++ b/drivers/base/power/qos.c | |||
@@ -212,11 +212,9 @@ int dev_pm_qos_add_request(struct device *dev, struct dev_pm_qos_request *req, | |||
212 | if (!dev || !req) /*guard against callers passing in null */ | 212 | if (!dev || !req) /*guard against callers passing in null */ |
213 | return -EINVAL; | 213 | return -EINVAL; |
214 | 214 | ||
215 | if (dev_pm_qos_request_active(req)) { | 215 | if (WARN(dev_pm_qos_request_active(req), |
216 | WARN(1, KERN_ERR "dev_pm_qos_add_request() called for already " | 216 | "%s() called for already added request\n", __func__)) |
217 | "added request\n"); | ||
218 | return -EINVAL; | 217 | return -EINVAL; |
219 | } | ||
220 | 218 | ||
221 | req->dev = dev; | 219 | req->dev = dev; |
222 | 220 | ||
@@ -271,11 +269,9 @@ int dev_pm_qos_update_request(struct dev_pm_qos_request *req, | |||
271 | if (!req) /*guard against callers passing in null */ | 269 | if (!req) /*guard against callers passing in null */ |
272 | return -EINVAL; | 270 | return -EINVAL; |
273 | 271 | ||
274 | if (!dev_pm_qos_request_active(req)) { | 272 | if (WARN(!dev_pm_qos_request_active(req), |
275 | WARN(1, KERN_ERR "dev_pm_qos_update_request() called for " | 273 | "%s() called for unknown object\n", __func__)) |
276 | "unknown object\n"); | ||
277 | return -EINVAL; | 274 | return -EINVAL; |
278 | } | ||
279 | 275 | ||
280 | mutex_lock(&dev_pm_qos_mtx); | 276 | mutex_lock(&dev_pm_qos_mtx); |
281 | 277 | ||
@@ -312,11 +308,9 @@ int dev_pm_qos_remove_request(struct dev_pm_qos_request *req) | |||
312 | if (!req) /*guard against callers passing in null */ | 308 | if (!req) /*guard against callers passing in null */ |
313 | return -EINVAL; | 309 | return -EINVAL; |
314 | 310 | ||
315 | if (!dev_pm_qos_request_active(req)) { | 311 | if (WARN(!dev_pm_qos_request_active(req), |
316 | WARN(1, KERN_ERR "dev_pm_qos_remove_request() called for " | 312 | "%s() called for unknown object\n", __func__)) |
317 | "unknown object\n"); | ||
318 | return -EINVAL; | 313 | return -EINVAL; |
319 | } | ||
320 | 314 | ||
321 | mutex_lock(&dev_pm_qos_mtx); | 315 | mutex_lock(&dev_pm_qos_mtx); |
322 | 316 | ||