Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 117347
b: refs/heads/master
c: 61b8369
h: refs/heads/master
i:
  117345: 58e8220
  117343: 43243c5
v: v3
  • Loading branch information
Shaohua Li authored and Len Brown committed Sep 24, 2008
1 parent 1ebce64 commit 8dc9760
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4be9309d15e88e4a1e4a78deb52eb88c7da38c99
refs/heads/master: 61b836958371c717d1e6d4fea1d2c512969ad20b
14 changes: 10 additions & 4 deletions trunk/drivers/acpi/dock.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@ register_hotplug_dock_device(acpi_handle handle, struct acpi_dock_ops *ops,
{
struct dock_dependent_device *dd;
struct dock_station *dock_station;
int ret = -EINVAL;

if (!dock_station_count)
return -ENODEV;
Expand All @@ -618,16 +619,21 @@ register_hotplug_dock_device(acpi_handle handle, struct acpi_dock_ops *ops,
* this would include the dock station itself
*/
list_for_each_entry(dock_station, &dock_stations, sibiling) {
/*
* An ATA bay can be in a dock and itself can be ejected
* seperately, so there are two 'dock stations' which need the
* ops
*/
dd = find_dock_dependent_device(dock_station, handle);
if (dd) {
dd->ops = ops;
dd->context = context;
dock_add_hotplug_device(dock_station, dd);
return 0;
ret = 0;
}
}

return -EINVAL;
return ret;
}

EXPORT_SYMBOL_GPL(register_hotplug_dock_device);
Expand Down Expand Up @@ -1078,8 +1084,8 @@ find_dock(acpi_handle handle, u32 lvl, void *context, void **rv)
static acpi_status
find_bay(acpi_handle handle, u32 lvl, void *context, void **rv)
{
/* If bay is in a dock, it's already handled */
if (is_ejectable_bay(handle) && !is_dock_device(handle))
/* If bay is a dock, it's already handled */
if (is_ejectable_bay(handle) && !is_dock(handle))
dock_add(handle);
return AE_OK;
}
Expand Down

0 comments on commit 8dc9760

Please sign in to comment.