diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-07-04 21:23:36 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-07-14 19:33:12 -0400 |
commit | 2efbca4dfc7b43951de6dd1647f9eebda9d4372b (patch) | |
tree | b3aaaab16fea1eae333a84603e0dc062bd309d66 | |
parent | f09ce741a03ad7de591aa47e760fbeee28567b63 (diff) |
ACPI / dock: Drop unnecessary local variable from dock_add()
The local variable id in dock_add() is not necessary, so drop it.
While we're at it, use an initializer to clear the local variable ds
and drop the memset() used for this purpose.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/acpi/dock.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index c89a9c3b48b4..f601658a4ad2 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c | |||
@@ -836,14 +836,13 @@ static struct attribute_group dock_attribute_group = { | |||
836 | */ | 836 | */ |
837 | static int __init dock_add(acpi_handle handle) | 837 | static int __init dock_add(acpi_handle handle) |
838 | { | 838 | { |
839 | int ret, id; | 839 | struct dock_station *dock_station, ds = { NULL, }; |
840 | struct dock_station ds, *dock_station; | ||
841 | struct platform_device *dd; | 840 | struct platform_device *dd; |
842 | acpi_status status; | 841 | acpi_status status; |
842 | int ret; | ||
843 | 843 | ||
844 | id = dock_station_count; | 844 | dd = platform_device_register_data(NULL, "dock", dock_station_count, |
845 | memset(&ds, 0, sizeof(ds)); | 845 | &ds, sizeof(ds)); |
846 | dd = platform_device_register_data(NULL, "dock", id, &ds, sizeof(ds)); | ||
847 | if (IS_ERR(dd)) | 846 | if (IS_ERR(dd)) |
848 | return PTR_ERR(dd); | 847 | return PTR_ERR(dd); |
849 | 848 | ||