aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/hv
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2010-10-20 16:07:11 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-20 16:07:11 -0700
commit150b19d43065762f19a4e6060b07c9bbbc85bcc7 (patch)
treec47e9e8a7f7b4e990756a1fa0b88bf51a8cc5b71 /drivers/staging/hv
parentStaging: hv: vmbus_drv: remove vmbus_child_device_get_info (diff)
downloadlinux-dev-150b19d43065762f19a4e6060b07c9bbbc85bcc7.tar.xz
linux-dev-150b19d43065762f19a4e6060b07c9bbbc85bcc7.zip
Staging: hv: make get_channel_info static
This is done by moving it to the only .c file it is used in. This also allowed us to delete the channel_interface.h file, as it's no longer needed. Cc: Haiyang Zhang <haiyangz@microsoft.com> Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv')
-rw-r--r--drivers/staging/hv/channel_interface.c42
-rw-r--r--drivers/staging/hv/channel_interface.h33
-rw-r--r--drivers/staging/hv/vmbus_drv.c43
-rw-r--r--drivers/staging/hv/vmbus_private.h1
4 files changed, 42 insertions, 77 deletions
diff --git a/drivers/staging/hv/channel_interface.c b/drivers/staging/hv/channel_interface.c
index c0d1ac8875c1..24a8951b9a15 100644
--- a/drivers/staging/hv/channel_interface.c
+++ b/drivers/staging/hv/channel_interface.c
@@ -98,48 +98,6 @@ static int ivmbus_teardown_gpadl(struct hv_device *device,
}
-
-void get_channel_info(struct hv_device *device, struct hv_device_info *info)
-{
- struct vmbus_channel_debug_info debug_info;
-
- if (!device->context)
- return;
-
- vmbus_get_debug_info(device->context, &debug_info);
-
- info->ChannelId = debug_info.RelId;
- info->ChannelState = debug_info.State;
- memcpy(&info->ChannelType, &debug_info.InterfaceType,
- sizeof(struct hv_guid));
- memcpy(&info->ChannelInstance, &debug_info.InterfaceInstance,
- sizeof(struct hv_guid));
-
- info->MonitorId = debug_info.MonitorId;
-
- info->ServerMonitorPending = debug_info.ServerMonitorPending;
- info->ServerMonitorLatency = debug_info.ServerMonitorLatency;
- info->ServerMonitorConnectionId = debug_info.ServerMonitorConnectionId;
-
- info->ClientMonitorPending = debug_info.ClientMonitorPending;
- info->ClientMonitorLatency = debug_info.ClientMonitorLatency;
- info->ClientMonitorConnectionId = debug_info.ClientMonitorConnectionId;
-
- info->Inbound.InterruptMask = debug_info.Inbound.CurrentInterruptMask;
- info->Inbound.ReadIndex = debug_info.Inbound.CurrentReadIndex;
- info->Inbound.WriteIndex = debug_info.Inbound.CurrentWriteIndex;
- info->Inbound.BytesAvailToRead = debug_info.Inbound.BytesAvailToRead;
- info->Inbound.BytesAvailToWrite = debug_info.Inbound.BytesAvailToWrite;
-
- info->Outbound.InterruptMask = debug_info.Outbound.CurrentInterruptMask;
- info->Outbound.ReadIndex = debug_info.Outbound.CurrentReadIndex;
- info->Outbound.WriteIndex = debug_info.Outbound.CurrentWriteIndex;
- info->Outbound.BytesAvailToRead = debug_info.Outbound.BytesAvailToRead;
- info->Outbound.BytesAvailToWrite =
- debug_info.Outbound.BytesAvailToWrite;
-}
-
-
/* vmbus interface function pointer table */
const struct vmbus_channel_interface vmbus_ops = {
.Open = ivmbus_open,
diff --git a/drivers/staging/hv/channel_interface.h b/drivers/staging/hv/channel_interface.h
deleted file mode 100644
index 82cff3d7f06f..000000000000
--- a/drivers/staging/hv/channel_interface.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *
- * Copyright (c) 2009, Microsoft Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place - Suite 330, Boston, MA 02111-1307 USA.
- *
- * Authors:
- * Haiyang Zhang <haiyangz@microsoft.com>
- * Hank Janssen <hjanssen@microsoft.com>
- *
- */
-
-
-#ifndef _CHANNEL_INTERFACE_H_
-#define _CHANNEL_INTERFACE_H_
-
-#include "vmbus_api.h"
-
-void get_channel_info(struct hv_device *device,
- struct hv_device_info *info);
-
-#endif /* _CHANNEL_INTERFACE_H_ */
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 8b3b14e5c37d..1e0a1de8261d 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -32,7 +32,7 @@
#include "osd.h"
#include "logging.h"
#include "vmbus.h"
-#include "channel_interface.h"
+#include "channel.h"
/* FIXME! We need to do this dynamically for PIC and APIC system */
@@ -129,6 +129,47 @@ static struct vmbus_driver_context g_vmbus_drv = {
.bus.dev_attrs = vmbus_device_attrs,
};
+static void get_channel_info(struct hv_device *device,
+ struct hv_device_info *info)
+{
+ struct vmbus_channel_debug_info debug_info;
+
+ if (!device->context)
+ return;
+
+ vmbus_get_debug_info(device->context, &debug_info);
+
+ info->ChannelId = debug_info.RelId;
+ info->ChannelState = debug_info.State;
+ memcpy(&info->ChannelType, &debug_info.InterfaceType,
+ sizeof(struct hv_guid));
+ memcpy(&info->ChannelInstance, &debug_info.InterfaceInstance,
+ sizeof(struct hv_guid));
+
+ info->MonitorId = debug_info.MonitorId;
+
+ info->ServerMonitorPending = debug_info.ServerMonitorPending;
+ info->ServerMonitorLatency = debug_info.ServerMonitorLatency;
+ info->ServerMonitorConnectionId = debug_info.ServerMonitorConnectionId;
+
+ info->ClientMonitorPending = debug_info.ClientMonitorPending;
+ info->ClientMonitorLatency = debug_info.ClientMonitorLatency;
+ info->ClientMonitorConnectionId = debug_info.ClientMonitorConnectionId;
+
+ info->Inbound.InterruptMask = debug_info.Inbound.CurrentInterruptMask;
+ info->Inbound.ReadIndex = debug_info.Inbound.CurrentReadIndex;
+ info->Inbound.WriteIndex = debug_info.Inbound.CurrentWriteIndex;
+ info->Inbound.BytesAvailToRead = debug_info.Inbound.BytesAvailToRead;
+ info->Inbound.BytesAvailToWrite = debug_info.Inbound.BytesAvailToWrite;
+
+ info->Outbound.InterruptMask = debug_info.Outbound.CurrentInterruptMask;
+ info->Outbound.ReadIndex = debug_info.Outbound.CurrentReadIndex;
+ info->Outbound.WriteIndex = debug_info.Outbound.CurrentWriteIndex;
+ info->Outbound.BytesAvailToRead = debug_info.Outbound.BytesAvailToRead;
+ info->Outbound.BytesAvailToWrite =
+ debug_info.Outbound.BytesAvailToWrite;
+}
+
/*
* vmbus_show_device_attr - Show the device attribute in sysfs.
*
diff --git a/drivers/staging/hv/vmbus_private.h b/drivers/staging/hv/vmbus_private.h
index 588c667a7f6b..7bdb29ac8952 100644
--- a/drivers/staging/hv/vmbus_private.h
+++ b/drivers/staging/hv/vmbus_private.h
@@ -29,7 +29,6 @@
#include "vmbus_api.h"
#include "channel.h"
#include "channel_mgmt.h"
-#include "channel_interface.h"
#include "ring_buffer.h"
#include <linux/list.h>