ACPI: sysfs eject support for ACPI scan handlers
authorToshi Kani <toshi.kani@hp.com>
Thu, 7 Feb 2013 11:50:53 +0000 (12:50 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 13 Feb 2013 12:41:39 +0000 (13:41 +0100)
Changed sysfs eject, acpi_eject_store(), so that it doesn't return
error codes for devices nodes with ACPI scan handlers attached and
no ACPI drivers.

[rjw: Changelog]
Signed-off-by: Toshi Kani <toshi.kani@hp.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/scan.c

index 688b7f7c23dda7e12548bb58f32369bac42029c9..95547efcffe0293f5e341dc2be3bd18fbf367e0d 100644 (file)
@@ -203,7 +203,7 @@ acpi_eject_store(struct device *d, struct device_attribute *attr,
                return -EINVAL;
        }
 #ifndef FORCE_EJECT
-       if (acpi_device->driver == NULL) {
+       if (!acpi_device->driver && !acpi_device->handler) {
                ret = -ENODEV;
                goto err;
        }