diff options
author | James Morris <jmorris@namei.org> | 2011-04-19 07:32:41 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2011-04-19 07:32:41 -0400 |
commit | d4ab4e6a23f805abb8fc3cc34525eec3788aeca1 (patch) | |
tree | eefd82c155bc27469a85667d759cd90facf4a6e3 /drivers/base | |
parent | c0fa797ae6cd02ff87c0bfe0d509368a3b45640e (diff) | |
parent | 96fd2d57b8252e16dfacf8941f7a74a6119197f5 (diff) |
Merge branch 'master'; commit 'v2.6.39-rc3' into next
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/platform.c | 7 | ||||
-rw-r--r-- | drivers/base/power/main.c | 8 | ||||
-rw-r--r-- | drivers/base/power/runtime.c | 2 | ||||
-rw-r--r-- | drivers/base/sys.c | 14 |
4 files changed, 16 insertions, 15 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index f051cfff18af..9e0e4fc24c46 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c | |||
@@ -149,6 +149,7 @@ static void platform_device_release(struct device *dev) | |||
149 | 149 | ||
150 | of_device_node_put(&pa->pdev.dev); | 150 | of_device_node_put(&pa->pdev.dev); |
151 | kfree(pa->pdev.dev.platform_data); | 151 | kfree(pa->pdev.dev.platform_data); |
152 | kfree(pa->pdev.mfd_cell); | ||
152 | kfree(pa->pdev.resource); | 153 | kfree(pa->pdev.resource); |
153 | kfree(pa); | 154 | kfree(pa); |
154 | } | 155 | } |
@@ -771,7 +772,7 @@ int __weak platform_pm_resume_noirq(struct device *dev) | |||
771 | 772 | ||
772 | #endif /* !CONFIG_SUSPEND */ | 773 | #endif /* !CONFIG_SUSPEND */ |
773 | 774 | ||
774 | #ifdef CONFIG_HIBERNATION | 775 | #ifdef CONFIG_HIBERNATE_CALLBACKS |
775 | 776 | ||
776 | static int platform_pm_freeze(struct device *dev) | 777 | static int platform_pm_freeze(struct device *dev) |
777 | { | 778 | { |
@@ -909,7 +910,7 @@ static int platform_pm_restore_noirq(struct device *dev) | |||
909 | return ret; | 910 | return ret; |
910 | } | 911 | } |
911 | 912 | ||
912 | #else /* !CONFIG_HIBERNATION */ | 913 | #else /* !CONFIG_HIBERNATE_CALLBACKS */ |
913 | 914 | ||
914 | #define platform_pm_freeze NULL | 915 | #define platform_pm_freeze NULL |
915 | #define platform_pm_thaw NULL | 916 | #define platform_pm_thaw NULL |
@@ -920,7 +921,7 @@ static int platform_pm_restore_noirq(struct device *dev) | |||
920 | #define platform_pm_poweroff_noirq NULL | 921 | #define platform_pm_poweroff_noirq NULL |
921 | #define platform_pm_restore_noirq NULL | 922 | #define platform_pm_restore_noirq NULL |
922 | 923 | ||
923 | #endif /* !CONFIG_HIBERNATION */ | 924 | #endif /* !CONFIG_HIBERNATE_CALLBACKS */ |
924 | 925 | ||
925 | #ifdef CONFIG_PM_RUNTIME | 926 | #ifdef CONFIG_PM_RUNTIME |
926 | 927 | ||
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 052dc53eef38..fbc5b6e7c591 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
@@ -233,7 +233,7 @@ static int pm_op(struct device *dev, | |||
233 | } | 233 | } |
234 | break; | 234 | break; |
235 | #endif /* CONFIG_SUSPEND */ | 235 | #endif /* CONFIG_SUSPEND */ |
236 | #ifdef CONFIG_HIBERNATION | 236 | #ifdef CONFIG_HIBERNATE_CALLBACKS |
237 | case PM_EVENT_FREEZE: | 237 | case PM_EVENT_FREEZE: |
238 | case PM_EVENT_QUIESCE: | 238 | case PM_EVENT_QUIESCE: |
239 | if (ops->freeze) { | 239 | if (ops->freeze) { |
@@ -260,7 +260,7 @@ static int pm_op(struct device *dev, | |||
260 | suspend_report_result(ops->restore, error); | 260 | suspend_report_result(ops->restore, error); |
261 | } | 261 | } |
262 | break; | 262 | break; |
263 | #endif /* CONFIG_HIBERNATION */ | 263 | #endif /* CONFIG_HIBERNATE_CALLBACKS */ |
264 | default: | 264 | default: |
265 | error = -EINVAL; | 265 | error = -EINVAL; |
266 | } | 266 | } |
@@ -308,7 +308,7 @@ static int pm_noirq_op(struct device *dev, | |||
308 | } | 308 | } |
309 | break; | 309 | break; |
310 | #endif /* CONFIG_SUSPEND */ | 310 | #endif /* CONFIG_SUSPEND */ |
311 | #ifdef CONFIG_HIBERNATION | 311 | #ifdef CONFIG_HIBERNATE_CALLBACKS |
312 | case PM_EVENT_FREEZE: | 312 | case PM_EVENT_FREEZE: |
313 | case PM_EVENT_QUIESCE: | 313 | case PM_EVENT_QUIESCE: |
314 | if (ops->freeze_noirq) { | 314 | if (ops->freeze_noirq) { |
@@ -335,7 +335,7 @@ static int pm_noirq_op(struct device *dev, | |||
335 | suspend_report_result(ops->restore_noirq, error); | 335 | suspend_report_result(ops->restore_noirq, error); |
336 | } | 336 | } |
337 | break; | 337 | break; |
338 | #endif /* CONFIG_HIBERNATION */ | 338 | #endif /* CONFIG_HIBERNATE_CALLBACKS */ |
339 | default: | 339 | default: |
340 | error = -EINVAL; | 340 | error = -EINVAL; |
341 | } | 341 | } |
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index 54597c859ecb..3172c60d23a9 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c | |||
@@ -443,7 +443,7 @@ static int rpm_suspend(struct device *dev, int rpmflags) | |||
443 | * | 443 | * |
444 | * Check if the device's run-time PM status allows it to be resumed. Cancel | 444 | * Check if the device's run-time PM status allows it to be resumed. Cancel |
445 | * any scheduled or pending requests. If another resume has been started | 445 | * any scheduled or pending requests. If another resume has been started |
446 | * earlier, either return imediately or wait for it to finish, depending on the | 446 | * earlier, either return immediately or wait for it to finish, depending on the |
447 | * RPM_NOWAIT and RPM_ASYNC flags. Similarly, if there's a suspend running in | 447 | * RPM_NOWAIT and RPM_ASYNC flags. Similarly, if there's a suspend running in |
448 | * parallel with this function, either tell the other process to resume after | 448 | * parallel with this function, either tell the other process to resume after |
449 | * suspending (deferred_resume) or wait for it to finish. If the RPM_ASYNC | 449 | * suspending (deferred_resume) or wait for it to finish. If the RPM_ASYNC |
diff --git a/drivers/base/sys.c b/drivers/base/sys.c index fbe72da6c414..acde9b5ee131 100644 --- a/drivers/base/sys.c +++ b/drivers/base/sys.c | |||
@@ -197,7 +197,7 @@ kset_put: | |||
197 | } | 197 | } |
198 | 198 | ||
199 | /** | 199 | /** |
200 | * sysdev_driver_register - Register auxillary driver | 200 | * sysdev_driver_register - Register auxiliary driver |
201 | * @cls: Device class driver belongs to. | 201 | * @cls: Device class driver belongs to. |
202 | * @drv: Driver. | 202 | * @drv: Driver. |
203 | * | 203 | * |
@@ -250,7 +250,7 @@ unlock: | |||
250 | } | 250 | } |
251 | 251 | ||
252 | /** | 252 | /** |
253 | * sysdev_driver_unregister - Remove an auxillary driver. | 253 | * sysdev_driver_unregister - Remove an auxiliary driver. |
254 | * @cls: Class driver belongs to. | 254 | * @cls: Class driver belongs to. |
255 | * @drv: Driver. | 255 | * @drv: Driver. |
256 | */ | 256 | */ |
@@ -302,7 +302,7 @@ int sysdev_register(struct sys_device *sysdev) | |||
302 | * code that should have called us. | 302 | * code that should have called us. |
303 | */ | 303 | */ |
304 | 304 | ||
305 | /* Notify class auxillary drivers */ | 305 | /* Notify class auxiliary drivers */ |
306 | list_for_each_entry(drv, &cls->drivers, entry) { | 306 | list_for_each_entry(drv, &cls->drivers, entry) { |
307 | if (drv->add) | 307 | if (drv->add) |
308 | drv->add(sysdev); | 308 | drv->add(sysdev); |
@@ -335,7 +335,7 @@ void sysdev_unregister(struct sys_device *sysdev) | |||
335 | * | 335 | * |
336 | * Loop over each class of system devices, and the devices in each | 336 | * Loop over each class of system devices, and the devices in each |
337 | * of those classes. For each device, we call the shutdown method for | 337 | * of those classes. For each device, we call the shutdown method for |
338 | * each driver registered for the device - the auxillaries, | 338 | * each driver registered for the device - the auxiliaries, |
339 | * and the class driver. | 339 | * and the class driver. |
340 | * | 340 | * |
341 | * Note: The list is iterated in reverse order, so that we shut down | 341 | * Note: The list is iterated in reverse order, so that we shut down |
@@ -360,7 +360,7 @@ void sysdev_shutdown(void) | |||
360 | struct sysdev_driver *drv; | 360 | struct sysdev_driver *drv; |
361 | pr_debug(" %s\n", kobject_name(&sysdev->kobj)); | 361 | pr_debug(" %s\n", kobject_name(&sysdev->kobj)); |
362 | 362 | ||
363 | /* Call auxillary drivers first */ | 363 | /* Call auxiliary drivers first */ |
364 | list_for_each_entry(drv, &cls->drivers, entry) { | 364 | list_for_each_entry(drv, &cls->drivers, entry) { |
365 | if (drv->shutdown) | 365 | if (drv->shutdown) |
366 | drv->shutdown(sysdev); | 366 | drv->shutdown(sysdev); |
@@ -385,7 +385,7 @@ static void __sysdev_resume(struct sys_device *dev) | |||
385 | WARN_ONCE(!irqs_disabled(), | 385 | WARN_ONCE(!irqs_disabled(), |
386 | "Interrupts enabled after %pF\n", cls->resume); | 386 | "Interrupts enabled after %pF\n", cls->resume); |
387 | 387 | ||
388 | /* Call auxillary drivers next. */ | 388 | /* Call auxiliary drivers next. */ |
389 | list_for_each_entry(drv, &cls->drivers, entry) { | 389 | list_for_each_entry(drv, &cls->drivers, entry) { |
390 | if (drv->resume) | 390 | if (drv->resume) |
391 | drv->resume(dev); | 391 | drv->resume(dev); |
@@ -432,7 +432,7 @@ int sysdev_suspend(pm_message_t state) | |||
432 | list_for_each_entry(sysdev, &cls->kset.list, kobj.entry) { | 432 | list_for_each_entry(sysdev, &cls->kset.list, kobj.entry) { |
433 | pr_debug(" %s\n", kobject_name(&sysdev->kobj)); | 433 | pr_debug(" %s\n", kobject_name(&sysdev->kobj)); |
434 | 434 | ||
435 | /* Call auxillary drivers first */ | 435 | /* Call auxiliary drivers first */ |
436 | list_for_each_entry(drv, &cls->drivers, entry) { | 436 | list_for_each_entry(drv, &cls->drivers, entry) { |
437 | if (drv->suspend) { | 437 | if (drv->suspend) { |
438 | ret = drv->suspend(sysdev, state); | 438 | ret = drv->suspend(sysdev, state); |