diff options
-rw-r--r-- | drivers/acpi/dock.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index edeb72b619fb..3199ce950e05 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c | |||
@@ -768,12 +768,18 @@ static struct attribute_group dock_attribute_group = { | |||
768 | void acpi_dock_add(struct acpi_device *adev) | 768 | void acpi_dock_add(struct acpi_device *adev) |
769 | { | 769 | { |
770 | struct dock_station *dock_station, ds = { NULL, }; | 770 | struct dock_station *dock_station, ds = { NULL, }; |
771 | struct platform_device_info pdevinfo; | ||
771 | acpi_handle handle = adev->handle; | 772 | acpi_handle handle = adev->handle; |
772 | struct platform_device *dd; | 773 | struct platform_device *dd; |
773 | int ret; | 774 | int ret; |
774 | 775 | ||
775 | dd = platform_device_register_data(NULL, "dock", dock_station_count, | 776 | memset(&pdevinfo, 0, sizeof(pdevinfo)); |
776 | &ds, sizeof(ds)); | 777 | pdevinfo.name = "dock"; |
778 | pdevinfo.id = dock_station_count; | ||
779 | pdevinfo.acpi_node.companion = adev; | ||
780 | pdevinfo.data = &ds; | ||
781 | pdevinfo.size_data = sizeof(ds); | ||
782 | dd = platform_device_register_full(&pdevinfo); | ||
777 | if (IS_ERR(dd)) | 783 | if (IS_ERR(dd)) |
778 | return; | 784 | return; |
779 | 785 | ||