ACPI / scan: Drop the second argument of acpi_bus_trim()

All callers of acpi_bus_trim() pass 1 (true) as the second argument
of it, so remove that argument entirely and change acpi_bus_trim()
to always behave as though it were 1.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Toshi Kani <toshi.kani@hp.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
此提交包含在:
Rafael J. Wysocki
2013-01-15 13:23:53 +01:00
父節點 b17b537ac1
當前提交 ae281795ec
共有 5 個檔案被更改,包括 9 行新增17 行删除

查看文件

@@ -133,7 +133,7 @@ void acpi_bus_hot_remove_device(void *context)
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Hot-removing device %s...\n", dev_name(&device->dev)));
if (acpi_bus_trim(device, 1)) {
if (acpi_bus_trim(device)) {
printk(KERN_ERR PREFIX
"Removing device failed\n");
goto err_out;
@@ -1374,7 +1374,7 @@ static int acpi_device_set_context(struct acpi_device *device)
return -ENODEV;
}
static int acpi_bus_remove(struct acpi_device *dev, int rmdevice)
static int acpi_bus_remove(struct acpi_device *dev)
{
if (!dev)
return -EINVAL;
@@ -1382,9 +1382,6 @@ static int acpi_bus_remove(struct acpi_device *dev, int rmdevice)
dev->removal_type = ACPI_BUS_REMOVAL_EJECT;
device_release_driver(&dev->dev);
if (!rmdevice)
return 0;
acpi_device_unregister(dev);
return 0;
@@ -1642,7 +1639,7 @@ int acpi_bus_add(acpi_handle handle)
}
EXPORT_SYMBOL(acpi_bus_add);
int acpi_bus_trim(struct acpi_device *start, int rmdevice)
int acpi_bus_trim(struct acpi_device *start)
{
acpi_status status;
struct acpi_device *parent, *child;
@@ -1668,12 +1665,7 @@ int acpi_bus_trim(struct acpi_device *start, int rmdevice)
acpi_get_parent(phandle, &phandle);
child = parent;
parent = parent->parent;
if (level == 0)
err = acpi_bus_remove(child, rmdevice);
else
err = acpi_bus_remove(child, 1);
err = acpi_bus_remove(child);
continue;
}