]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/acpi/device_pm.c
cxgb4: Signedness bug in init_one()
[linux.git] / drivers / acpi / device_pm.c
index f616b16c1f0be267aa5c116b14a35b095a5ac5d5..08bb9f2f2d2310367c9fde629aaa62e8955bf0e9 100644 (file)
@@ -166,6 +166,10 @@ int acpi_device_set_power(struct acpi_device *device, int state)
            || (state < ACPI_STATE_D0) || (state > ACPI_STATE_D3_COLD))
                return -EINVAL;
 
+       acpi_handle_debug(device->handle, "Power state change: %s -> %s\n",
+                         acpi_power_state_string(device->power.state),
+                         acpi_power_state_string(state));
+
        /* Make sure this is a valid target state */
 
        /* There is a special case for D0 addressed below. */
@@ -497,7 +501,8 @@ acpi_status acpi_add_pm_notifier(struct acpi_device *adev, struct device *dev,
                goto out;
 
        mutex_lock(&acpi_pm_notifier_lock);
-       adev->wakeup.ws = wakeup_source_register(dev_name(&adev->dev));
+       adev->wakeup.ws = wakeup_source_register(&adev->dev,
+                                                dev_name(&adev->dev));
        adev->wakeup.context.dev = dev;
        adev->wakeup.context.func = func;
        adev->wakeup.flags.notifier_present = true;