diff options
Diffstat (limited to 'drivers/acpi/dock.c')
-rw-r--r-- | drivers/acpi/dock.c | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index ec117c6c996c..c3b34f94382f 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c | |||
@@ -994,30 +994,6 @@ err_unregister: | |||
994 | } | 994 | } |
995 | 995 | ||
996 | /** | 996 | /** |
997 | * dock_remove - free up resources related to the dock station | ||
998 | */ | ||
999 | static int dock_remove(struct dock_station *ds) | ||
1000 | { | ||
1001 | struct dock_dependent_device *dd, *tmp; | ||
1002 | struct platform_device *dock_device = ds->dock_device; | ||
1003 | |||
1004 | if (!dock_station_count) | ||
1005 | return 0; | ||
1006 | |||
1007 | /* remove dependent devices */ | ||
1008 | list_for_each_entry_safe(dd, tmp, &ds->dependent_devices, list) | ||
1009 | kfree(dd); | ||
1010 | |||
1011 | list_del(&ds->sibling); | ||
1012 | |||
1013 | /* cleanup sysfs */ | ||
1014 | sysfs_remove_group(&dock_device->dev.kobj, &dock_attribute_group); | ||
1015 | platform_device_unregister(dock_device); | ||
1016 | |||
1017 | return 0; | ||
1018 | } | ||
1019 | |||
1020 | /** | ||
1021 | * find_dock_and_bay - look for dock stations and bays | 997 | * find_dock_and_bay - look for dock stations and bays |
1022 | * @handle: acpi handle of a device | 998 | * @handle: acpi handle of a device |
1023 | * @lvl: unused | 999 | * @lvl: unused |
@@ -1035,7 +1011,7 @@ find_dock_and_bay(acpi_handle handle, u32 lvl, void *context, void **rv) | |||
1035 | return AE_OK; | 1011 | return AE_OK; |
1036 | } | 1012 | } |
1037 | 1013 | ||
1038 | static int __init dock_init(void) | 1014 | int __init acpi_dock_init(void) |
1039 | { | 1015 | { |
1040 | if (acpi_disabled) | 1016 | if (acpi_disabled) |
1041 | return 0; | 1017 | return 0; |
@@ -1054,19 +1030,3 @@ static int __init dock_init(void) | |||
1054 | ACPI_DOCK_DRIVER_DESCRIPTION, dock_station_count); | 1030 | ACPI_DOCK_DRIVER_DESCRIPTION, dock_station_count); |
1055 | return 0; | 1031 | return 0; |
1056 | } | 1032 | } |
1057 | |||
1058 | static void __exit dock_exit(void) | ||
1059 | { | ||
1060 | struct dock_station *tmp, *dock_station; | ||
1061 | |||
1062 | unregister_acpi_bus_notifier(&dock_acpi_notifier); | ||
1063 | list_for_each_entry_safe(dock_station, tmp, &dock_stations, sibling) | ||
1064 | dock_remove(dock_station); | ||
1065 | } | ||
1066 | |||
1067 | /* | ||
1068 | * Must be called before drivers of devices in dock, otherwise we can't know | ||
1069 | * which devices are in a dock | ||
1070 | */ | ||
1071 | subsys_initcall(dock_init); | ||
1072 | module_exit(dock_exit); | ||