From 27b5b3ca6903675e8ad0a92562224fd0e185c43b Mon Sep 17 00:00:00 2001 From: "K. Y. Srinivasan" Date: Thu, 12 May 2011 19:34:25 -0700 Subject: [PATCH] Staging: hv: Move the contents of vmbus.h to hyperv.h Move the contents of vmbus.h to hyperv.h. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/blkvsc_drv.c | 1 - drivers/staging/hv/hv_kvp.c | 1 - drivers/staging/hv/hv_mouse.c | 1 - drivers/staging/hv/hv_util.c | 1 - drivers/staging/hv/hyperv.h | 20 +++++++++++++ drivers/staging/hv/netvsc_api.h | 1 - drivers/staging/hv/netvsc_drv.c | 1 - drivers/staging/hv/storvsc_api.h | 1 - drivers/staging/hv/storvsc_drv.c | 1 - drivers/staging/hv/vmbus.h | 51 -------------------------------- drivers/staging/hv/vmbus_drv.c | 1 - 11 files changed, 20 insertions(+), 60 deletions(-) delete mode 100644 drivers/staging/hv/vmbus.h diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c index 5059e448ca6c..44de4887e85c 100644 --- a/drivers/staging/hv/blkvsc_drv.c +++ b/drivers/staging/hv/blkvsc_drv.c @@ -34,7 +34,6 @@ #include "hyperv.h" #include "hv_api.h" -#include "vmbus.h" #include "storvsc_api.h" diff --git a/drivers/staging/hv/hv_kvp.c b/drivers/staging/hv/hv_kvp.c index 2595627d38cd..fd07dbc81c4f 100644 --- a/drivers/staging/hv/hv_kvp.c +++ b/drivers/staging/hv/hv_kvp.c @@ -29,7 +29,6 @@ #include "hyperv.h" #include "hv_api.h" -#include "vmbus.h" #include "vmbus_private.h" #include "utils.h" #include "hv_kvp.h" diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c index 82cc6850019c..68bb8d252961 100644 --- a/drivers/staging/hv/hv_mouse.c +++ b/drivers/staging/hv/hv_mouse.c @@ -28,7 +28,6 @@ #include "hyperv.h" #include "hv_api.h" -#include "vmbus.h" /* diff --git a/drivers/staging/hv/hv_util.c b/drivers/staging/hv/hv_util.c index f08f799e61cf..d1f78145252d 100644 --- a/drivers/staging/hv/hv_util.c +++ b/drivers/staging/hv/hv_util.c @@ -31,7 +31,6 @@ #include "hyperv.h" #include "hv_api.h" -#include "vmbus.h" #include "vmbus_private.h" #include "utils.h" #include "hv_kvp.h" diff --git a/drivers/staging/hv/hyperv.h b/drivers/staging/hv/hyperv.h index 10042b056b55..b6f500670f5a 100644 --- a/drivers/staging/hv/hyperv.h +++ b/drivers/staging/hv/hyperv.h @@ -822,4 +822,24 @@ struct hv_device { void *ext; }; +#include + + +static inline struct hv_device *device_to_hv_device(struct device *d) +{ + return container_of(d, struct hv_device, device); +} + +static inline struct hv_driver *drv_to_hv_drv(struct device_driver *d) +{ + return container_of(d, struct hv_driver, driver); +} + + +/* Vmbus interface */ +int vmbus_child_driver_register(struct device_driver *drv); +void vmbus_child_driver_unregister(struct device_driver *drv); + +extern struct completion hv_channel_ready; + #endif /* _HYPERV_H */ diff --git a/drivers/staging/hv/netvsc_api.h b/drivers/staging/hv/netvsc_api.h index 4689503b0c8b..ce4c8d2bf291 100644 --- a/drivers/staging/hv/netvsc_api.h +++ b/drivers/staging/hv/netvsc_api.h @@ -26,7 +26,6 @@ #define _NETVSC_API_H_ #include "hyperv.h" -#include "vmbus.h" /* Fwd declaration */ struct hv_netvsc_packet; diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index 6f4aeebcc824..b732d06d706f 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c @@ -41,7 +41,6 @@ #include "hyperv.h" #include "hv_api.h" -#include "vmbus.h" #include "netvsc_api.h" struct net_device_context { diff --git a/drivers/staging/hv/storvsc_api.h b/drivers/staging/hv/storvsc_api.h index 310712d3f4ba..394f7e25cd32 100644 --- a/drivers/staging/hv/storvsc_api.h +++ b/drivers/staging/hv/storvsc_api.h @@ -29,7 +29,6 @@ #include #include "vstorage.h" #include "hyperv.h" -#include "vmbus.h" /* Defines */ #define STORVSC_RING_BUFFER_SIZE (20*PAGE_SIZE) diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c index 852cf632c688..0a3035bc3a2a 100644 --- a/drivers/staging/hv/storvsc_drv.c +++ b/drivers/staging/hv/storvsc_drv.c @@ -35,7 +35,6 @@ #include "hyperv.h" #include "hv_api.h" -#include "vmbus.h" #include "storvsc_api.h" #include "vstorage.h" diff --git a/drivers/staging/hv/vmbus.h b/drivers/staging/hv/vmbus.h deleted file mode 100644 index 81029fd11617..000000000000 --- a/drivers/staging/hv/vmbus.h +++ /dev/null @@ -1,51 +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 - * Hank Janssen - * - */ - - -#ifndef _VMBUS_H_ -#define _VMBUS_H_ - -#include -#include "hyperv.h" - - - - -static inline struct hv_device *device_to_hv_device(struct device *d) -{ - return container_of(d, struct hv_device, device); -} - -static inline struct hv_driver *drv_to_hv_drv(struct device_driver *d) -{ - return container_of(d, struct hv_driver, driver); -} - - -/* Vmbus interface */ -int vmbus_child_driver_register(struct device_driver *drv); -void vmbus_child_driver_unregister(struct device_driver *drv); - -extern struct completion hv_channel_ready; - -#endif /* _VMBUS_H_ */ diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index 935fab3a8940..042e6df51242 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c @@ -37,7 +37,6 @@ #include "hyperv.h" #include "hv_api.h" -#include "vmbus.h" #include "vmbus_private.h" -- 2.30.2