aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2006-05-15 03:06:41 -0400
committerLen Brown <len.brown@intel.com>2006-05-15 03:06:41 -0400
commit531881d665ca011326bb466b97b07c95dee8d0a1 (patch)
tree20f5e15751ff07bc9124dde4a3e6387a03b75933 /drivers/acpi/scan.c
parent5b3272655a8e8a9a6e2503bc5a88fc9d9c8292a4 (diff)
ACPI: pass pm_message_t from acpi_device_suspend() to root_suspend()
in case we want to decode it for future use in acpi_op_suspend(..., state) also, inline new 1-liner static function http://bugzilla.kernel.org/show_bug.cgi?id=5000 Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 19ae9ff10210..eee58393eb46 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1372,13 +1372,13 @@ static int acpi_bus_scan_fixed(struct acpi_device *root)
1372} 1372}
1373 1373
1374 1374
1375static struct acpi_device * to_acpi_dev(struct device * dev) 1375static inline struct acpi_device * to_acpi_dev(struct device * dev)
1376{ 1376{
1377 return container_of(dev, struct acpi_device, dev); 1377 return container_of(dev, struct acpi_device, dev);
1378} 1378}
1379 1379
1380 1380
1381static int root_suspend(struct acpi_device * acpi_dev) 1381static int root_suspend(struct acpi_device * acpi_dev, pm_message_t state)
1382{ 1382{
1383 struct acpi_device * dev, * next; 1383 struct acpi_device * dev, * next;
1384 int result; 1384 int result;
@@ -1387,10 +1387,6 @@ static int root_suspend(struct acpi_device * acpi_dev)
1387 list_for_each_entry_safe_reverse(dev, next, &acpi_device_list, g_list) { 1387 list_for_each_entry_safe_reverse(dev, next, &acpi_device_list, g_list) {
1388 if (dev->driver && dev->driver->ops.suspend) { 1388 if (dev->driver && dev->driver->ops.suspend) {
1389 spin_unlock(&acpi_device_lock); 1389 spin_unlock(&acpi_device_lock);
1390
1391 /* TBD: What suspend state should be passed
1392 * to device?
1393 */
1394 result = dev->driver->ops.suspend(dev, 0); 1390 result = dev->driver->ops.suspend(dev, 0);
1395 if (result) { 1391 if (result) {
1396 printk(KERN_ERR PREFIX "[%s - %s] Suspend failed: %d\n", 1392 printk(KERN_ERR PREFIX "[%s - %s] Suspend failed: %d\n",
@@ -1416,7 +1412,7 @@ static int acpi_device_suspend(struct device * dev, pm_message_t state)
1416 * ACPI driver methods. 1412 * ACPI driver methods.
1417 */ 1413 */
1418 if (acpi_dev->handle == ACPI_ROOT_OBJECT) 1414 if (acpi_dev->handle == ACPI_ROOT_OBJECT)
1419 root_suspend(acpi_dev); 1415 root_suspend(acpi_dev, state);
1420 return 0; 1416 return 0;
1421} 1417}
1422 1418
@@ -1431,10 +1427,6 @@ static int root_resume(struct acpi_device * acpi_dev)
1431 list_for_each_entry_safe(dev, next, &acpi_device_list, g_list) { 1427 list_for_each_entry_safe(dev, next, &acpi_device_list, g_list) {
1432 if (dev->driver && dev->driver->ops.resume) { 1428 if (dev->driver && dev->driver->ops.resume) {
1433 spin_unlock(&acpi_device_lock); 1429 spin_unlock(&acpi_device_lock);
1434
1435 /* TBD: What suspend state should be passed
1436 * to device?
1437 */
1438 result = dev->driver->ops.resume(dev, 0); 1430 result = dev->driver->ops.resume(dev, 0);
1439 if (result) { 1431 if (result) {
1440 printk(KERN_ERR PREFIX "[%s - %s] resume failed: %d\n", 1432 printk(KERN_ERR PREFIX "[%s - %s] resume failed: %d\n",