]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
libata-acpi: fix up for acpi_pm_device_sleep_state API
authorStephen Rothwell <sfr@canb.auug.org.au>
Mon, 2 Jul 2012 02:10:41 +0000 (12:10 +1000)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 25 Jul 2012 20:02:19 +0000 (16:02 -0400)
After merging the libata tree, today's [2012-07-01] linux-next build (x86_64
allmodconfig) failed like this:

drivers/ata/libata-acpi.c: In function 'ata_acpi_set_state':
drivers/ata/libata-acpi.c:872:5: error: too few arguments to function 'acpi_pm_device_sleep_state'
include/acpi/acpi_bus.h:418:5: note: declared here

Caused by commit 3bd46600a7a7 ("libata-acpi: add ata port runtime D3Cold
support") from the libata tree interacting with commit ee85f543710d
("ACPI/PM: specify lowest allowed state for device sleep state") from the
pci tree.

This patch adds ACPI_STATE_D3 as the new third parameter to
acpi_pm_device_sleep_state()

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-acpi.c

index f1d6901de37d4f8d6360e37edf737eb63cc4479a..902b5a457170958f4d805ae30185cee170e6b6e9 100644 (file)
@@ -869,7 +869,7 @@ void ata_acpi_set_state(struct ata_port *ap, pm_message_t state)
 
                if (state.event != PM_EVENT_ON) {
                        acpi_state = acpi_pm_device_sleep_state(
-                               &dev->sdev->sdev_gendev, NULL);
+                               &dev->sdev->sdev_gendev, NULL, ACPI_STATE_D3);
                        if (acpi_state > 0)
                                acpi_bus_set_power(handle, acpi_state);
                        /* TBD: need to check if it's runtime pm request */