Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 177578
b: refs/heads/master
c: 9751cb7
h: refs/heads/master
v: v3
  • Loading branch information
Alex Chiang authored and Len Brown committed Dec 16, 2009
1 parent b110adc commit d4434c0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 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: c6f1905ea91bf56a921c6eb574488869c8c3eeff
refs/heads/master: 9751cb721ef650729e981c7b39abb7676cd646e1
16 changes: 7 additions & 9 deletions trunk/drivers/acpi/dock.c
Original file line number Diff line number Diff line change
Expand Up @@ -948,11 +948,18 @@ static int dock_add(acpi_handle handle)
struct dock_station *dock_station;
struct platform_device *dock_device;

dock_device =
platform_device_register_simple("dock",
dock_station_count, NULL, 0);
if (IS_ERR(dock_device))
return PTR_ERR(dock_device);

/* allocate & initialize the dock_station private data */
dock_station = kzalloc(sizeof(*dock_station), GFP_KERNEL);
if (!dock_station)
return -ENOMEM;
dock_station->handle = handle;
dock_station->dock_device = dock_device;
dock_station->last_dock_time = jiffies - HZ;
INIT_LIST_HEAD(&dock_station->dependent_devices);
INIT_LIST_HEAD(&dock_station->hotplug_devices);
Expand All @@ -961,15 +968,6 @@ static int dock_add(acpi_handle handle)
mutex_init(&dock_station->hp_lock);
ATOMIC_INIT_NOTIFIER_HEAD(&dock_notifier_list);

/* initialize platform device stuff */
dock_station->dock_device =
platform_device_register_simple("dock",
dock_station_count, NULL, 0);
dock_device = dock_station->dock_device;
if (IS_ERR(dock_device)) {
ret = PTR_ERR(dock_device);
goto out;
}
platform_device_add_data(dock_device, &dock_station,
sizeof(struct dock_station *));

Expand Down

0 comments on commit d4434c0

Please sign in to comment.