summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-15 16:23:53 +0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-15 16:23:53 +0400
commitae281795ec92d35dd1631401829124acab965b1f (patch)
treefbe1444521184eef3927aa0a8bb13e1da4356a9a /drivers
parentb17b537ac1429a609addb55bf985f5ebfcf4ae7b (diff)
downloadlinux-ae281795ec92d35dd1631401829124acab965b1f.tar.xz
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/dock.c2
-rw-r--r--drivers/acpi/scan.c16
-rw-r--r--drivers/pci/hotplug/acpiphp_glue.c4
-rw-r--r--drivers/pci/hotplug/sgi_hotplug.c2
4 files changed, 8 insertions, 16 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index 9e31b2bd93d3..4a56a8b2e51e 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -339,7 +339,7 @@ static void dock_remove_acpi_device(acpi_handle handle)
int ret;
if (!acpi_bus_get_device(handle, &device)) {
- ret = acpi_bus_trim(device, 1);
+ ret = acpi_bus_trim(device);
if (ret)
pr_debug("error removing bus, %x\n", -ret);
}
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index a26c09efc286..d14ce446b469 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -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;
}
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index 91b5ad875c53..22006f2d9dd5 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -742,7 +742,7 @@ static int acpiphp_bus_add(struct acpiphp_func *func)
/* this shouldn't be in here, so remove
* the bus then re-add it...
*/
- ret_val = acpi_bus_trim(device, 1);
+ ret_val = acpi_bus_trim(device);
dbg("acpi_bus_trim return %x\n", ret_val);
}
@@ -772,7 +772,7 @@ static int acpiphp_bus_trim(acpi_handle handle)
return retval;
}
- retval = acpi_bus_trim(device, 1);
+ retval = acpi_bus_trim(device);
if (retval)
err("cannot remove from acpi list\n");
diff --git a/drivers/pci/hotplug/sgi_hotplug.c b/drivers/pci/hotplug/sgi_hotplug.c
index f3c419256d2a..2e006ee5738b 100644
--- a/drivers/pci/hotplug/sgi_hotplug.c
+++ b/drivers/pci/hotplug/sgi_hotplug.c
@@ -535,7 +535,7 @@ static int disable_slot(struct hotplug_slot *bss_hotplug_slot)
ret = acpi_bus_get_device(chandle,
&device);
if (ACPI_SUCCESS(ret))
- acpi_bus_trim(device, 1);
+ acpi_bus_trim(device);
}
}