summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
authorLi Shaohua <shaohua.li@intel.com>2006-12-07 20:56:46 +0800
committerLen Brown <len.brown@intel.com>2006-12-15 23:38:35 -0500
commit96333578b023957537c3e98b50af7f3b7e08e411 (patch)
tree005686677555152dfe51c0edd5273a665c9d5aca /drivers/acpi/scan.c
parentc4168bff32e218b8400cb48b48adb9b7f7bb31b8 (diff)
downloadop-kernel-dev-96333578b023957537c3e98b50af7f3b7e08e411.zip
op-kernel-dev-96333578b023957537c3e98b50af7f3b7e08e411.tar.gz
ACPI: add acpi_bus_removal_type in acpi_device
Add removal_type in structure acpi_device for hot removal. ACPI_BUS_REMOVAL_EJECT is used for ACPI device hot removal. Only one parameter is allowed in .remove method due to driver model. So removal_type is added to indicate different removal type. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 2a82645..06b86fa 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -229,9 +229,9 @@ static int acpi_device_remove(struct device * dev)
if (acpi_drv) {
if (acpi_drv->ops.stop)
- acpi_drv->ops.stop(acpi_dev, ACPI_BUS_REMOVAL_NORMAL);
+ acpi_drv->ops.stop(acpi_dev, acpi_dev->removal_type);
if (acpi_drv->ops.remove)
- acpi_drv->ops.remove(acpi_dev, ACPI_BUS_REMOVAL_NORMAL);
+ acpi_drv->ops.remove(acpi_dev, acpi_dev->removal_type);
}
acpi_dev->driver = NULL;
acpi_driver_data(dev) = NULL;
@@ -294,6 +294,7 @@ static void acpi_device_register(struct acpi_device *device,
device_add(&device->dev);
acpi_device_setup_files(device);
+ device->removal_type = ACPI_BUS_REMOVAL_NORMAL;
}
static void acpi_device_unregister(struct acpi_device *device, int type)
@@ -859,6 +860,7 @@ static int acpi_bus_remove(struct acpi_device *dev, int rmdevice)
if (!dev)
return -EINVAL;
+ dev->removal_type = ACPI_BUS_REMOVAL_EJECT;
device_release_driver(&dev->dev);
if (!rmdevice)
OpenPOWER on IntegriCloud