diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-02-21 01:11:38 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-02-22 00:48:56 +0100 |
commit | f311e1c4a6ea2347c8e167525f8a0fb9af9125ed (patch) | |
tree | 6bd50586116aa339a6250cd357a0a22a9b33a7e9 /drivers/acpi/dock.c | |
parent | ACPI / dock: Drop struct acpi_dock_ops and all code related to it (diff) | |
download | linux-f311e1c4a6ea2347c8e167525f8a0fb9af9125ed.tar.xz linux-f311e1c4a6ea2347c8e167525f8a0fb9af9125ed.zip |
ACPI / dock: Drop remove_dock_dependent_devices()
Since remove_dock_dependent_devices() is only called from acpi_dock_add()
and it only is called if the add_dock_dependent_device() adding the
dock station to its own list of dependent devices has failed, it is not
really necessary, because the dock station's list of dependent devices
is guaranteed to be empty at that point. Drop it, then.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/dock.c')
-rw-r--r-- | drivers/acpi/dock.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index f6fd325078b3..d9baeae09d31 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c @@ -114,16 +114,6 @@ static int add_dock_dependent_device(struct dock_station *ds, return 0; } -static void remove_dock_dependent_devices(struct dock_station *ds) -{ - struct dock_dependent_device *dd, *aux; - - list_for_each_entry_safe(dd, aux, &ds->dependent_devices, list) { - list_del(&dd->list); - kfree(dd); - } -} - static void dock_hotplug_event(struct dock_dependent_device *dd, u32 event, enum dock_callback_type cb_type) { @@ -674,8 +664,8 @@ void acpi_dock_add(struct acpi_device *adev) return; err_rmgroup: - remove_dock_dependent_devices(dock_station); sysfs_remove_group(&dd->dev.kobj, &dock_attribute_group); + err_unregister: platform_device_unregister(dd); acpi_handle_err(handle, "%s encountered error %d\n", __func__, ret); |