diff options
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/platform.c | 4 | ||||
-rw-r--r-- | drivers/base/power/main.c | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 47051cd25113..3a94b799f166 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c | |||
@@ -432,7 +432,7 @@ struct platform_device *platform_device_register_full( | |||
432 | goto err_alloc; | 432 | goto err_alloc; |
433 | 433 | ||
434 | pdev->dev.parent = pdevinfo->parent; | 434 | pdev->dev.parent = pdevinfo->parent; |
435 | ACPI_HANDLE_SET(&pdev->dev, pdevinfo->acpi_node.handle); | 435 | ACPI_COMPANION_SET(&pdev->dev, pdevinfo->acpi_node.companion); |
436 | 436 | ||
437 | if (pdevinfo->dma_mask) { | 437 | if (pdevinfo->dma_mask) { |
438 | /* | 438 | /* |
@@ -463,7 +463,7 @@ struct platform_device *platform_device_register_full( | |||
463 | ret = platform_device_add(pdev); | 463 | ret = platform_device_add(pdev); |
464 | if (ret) { | 464 | if (ret) { |
465 | err: | 465 | err: |
466 | ACPI_HANDLE_SET(&pdev->dev, NULL); | 466 | ACPI_COMPANION_SET(&pdev->dev, NULL); |
467 | kfree(pdev->dev.dma_mask); | 467 | kfree(pdev->dev.dma_mask); |
468 | 468 | ||
469 | err_alloc: | 469 | err_alloc: |
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index c12e9b9556be..1b41fca3d65a 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
@@ -1350,6 +1350,9 @@ static int device_prepare(struct device *dev, pm_message_t state) | |||
1350 | 1350 | ||
1351 | device_unlock(dev); | 1351 | device_unlock(dev); |
1352 | 1352 | ||
1353 | if (error) | ||
1354 | pm_runtime_put(dev); | ||
1355 | |||
1353 | return error; | 1356 | return error; |
1354 | } | 1357 | } |
1355 | 1358 | ||