Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46444
b: refs/heads/master
c: 9633357
h: refs/heads/master
v: v3
  • Loading branch information
Li Shaohua authored and Len Brown committed Dec 16, 2006
1 parent dfe76f9 commit a167cf2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c4168bff32e218b8400cb48b48adb9b7f7bb31b8
refs/heads/master: 96333578b023957537c3e98b50af7f3b7e08e411
6 changes: 4 additions & 2 deletions trunk/drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions trunk/include/acpi/acpi_bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a167cf2

Please sign in to comment.