summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/dock.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-07-05 03:23:36 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-07-15 01:33:12 +0200
commit2efbca4dfc7b43951de6dd1647f9eebda9d4372b (patch)
treeb3aaaab16fea1eae333a84603e0dc062bd309d66 /drivers/acpi/dock.c
parentACPI / dock / PCI: Drop ACPI dock notifier chain (diff)
downloadlinux-2efbca4dfc7b43951de6dd1647f9eebda9d4372b.tar.xz
linux-2efbca4dfc7b43951de6dd1647f9eebda9d4372b.zip
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>
Diffstat (limited to 'drivers/acpi/dock.c')
-rw-r--r--drivers/acpi/dock.c9
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 = {
*/
static int __init dock_add(acpi_handle handle)
{
- int ret, id;
- struct dock_station ds, *dock_station;
+ struct dock_station *dock_station, ds = { NULL, };
struct platform_device *dd;
acpi_status status;
+ int ret;
- id = dock_station_count;
- memset(&ds, 0, sizeof(ds));
- dd = platform_device_register_data(NULL, "dock", id, &ds, sizeof(ds));
+ dd = platform_device_register_data(NULL, "dock", dock_station_count,
+ &ds, sizeof(ds));
if (IS_ERR(dd))
return PTR_ERR(dd);