From a167cf27f88450663805af9ef937539f1a755aa7 Mon Sep 17 00:00:00 2001 From: Li Shaohua Date: Thu, 7 Dec 2006 20:56:46 +0800 Subject: [PATCH] --- yaml --- r: 46444 b: refs/heads/master c: 96333578b023957537c3e98b50af7f3b7e08e411 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/acpi/scan.c | 6 ++++-- trunk/include/acpi/acpi_bus.h | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 015dadb30315..6928881caa5d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c4168bff32e218b8400cb48b48adb9b7f7bb31b8 +refs/heads/master: 96333578b023957537c3e98b50af7f3b7e08e411 diff --git a/trunk/drivers/acpi/scan.c b/trunk/drivers/acpi/scan.c index 2a82645c9dfe..06b86faf037f 100644 --- a/trunk/drivers/acpi/scan.c +++ b/trunk/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) diff --git a/trunk/include/acpi/acpi_bus.h b/trunk/include/acpi/acpi_bus.h index 8976dbea63ca..58dc8f651861 100644 --- a/trunk/include/acpi/acpi_bus.h +++ b/trunk/include/acpi/acpi_bus.h @@ -301,6 +301,7 @@ struct acpi_device { void *driver_data; struct device dev; struct acpi_bus_ops bus_ops; /* workaround for different code path for hotplug */ + enum acpi_bus_removal_type removal_type; /* indicate for different removal type */ }; #define acpi_driver_data(d) ((d)->driver_data)