1 From: Shaohua Li <shaohua.li@intel.com>
2 Subject: fix for bay in a dock station
3 Patch-mainline: submitted 2008-08-28
4 References: fate#304731,bnc#401740
6 an ATA bay can be in a dock and itself can be ejected separately. The
7 patch handles such eject bay. Found by Holger.
9 Signed-off-by: Shaohua Li <shaohua.li@intel.com>
10 Signed-off-by: Holger Macht <hmacht@suse.de>
14 drivers/acpi/dock.c | 14 ++++++++++----
15 1 file changed, 10 insertions(+), 4 deletions(-)
17 --- a/drivers/acpi/dock.c
18 +++ b/drivers/acpi/dock.c
19 @@ -609,6 +609,7 @@ register_hotplug_dock_device(acpi_handle
21 struct dock_dependent_device *dd;
22 struct dock_station *dock_station;
25 if (!dock_station_count)
27 @@ -618,16 +619,21 @@ register_hotplug_dock_device(acpi_handle
28 * this would include the dock station itself
30 list_for_each_entry(dock_station, &dock_stations, sibiling) {
32 + * An ATA bay can be in a dock and itself can be ejected
33 + * seperately, so there are two 'dock stations' which need the
36 dd = find_dock_dependent_device(dock_station, handle);
39 dd->context = context;
40 dock_add_hotplug_device(dock_station, dd);
50 EXPORT_SYMBOL_GPL(register_hotplug_dock_device);
51 @@ -1076,8 +1082,8 @@ find_dock(acpi_handle handle, u32 lvl, v
53 find_bay(acpi_handle handle, u32 lvl, void *context, void **rv)
55 - /* If bay is in a dock, it's already handled */
56 - if (is_ejectable_bay(handle) && !is_dock_device(handle))
57 + /* If bay is a dock, it's already handled */
58 + if (is_ejectable_bay(handle) && !is_dock(handle))