From 4983b39a0687b00688478e6748b979a02934b234 Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh@suse.de>
Date: Wed, 19 Aug 2009 16:14:47 -0700
Subject: Staging: hv: move osd.h

This moves osd.h out of the include/ subdirectory.

No code changes are made here.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/BlkVsc.c           |  1 +
 drivers/staging/hv/Channel.c          |  2 +-
 drivers/staging/hv/Channel.h          |  1 -
 drivers/staging/hv/ChannelInterface.c |  3 +-
 drivers/staging/hv/ChannelMgmt.c      |  2 +-
 drivers/staging/hv/ChannelMgmt.h      |  1 -
 drivers/staging/hv/Connection.c       |  1 +
 drivers/staging/hv/Hv.c               |  1 +
 drivers/staging/hv/Hv.h               |  2 -
 drivers/staging/hv/NetVsc.c           |  1 +
 drivers/staging/hv/RingBuffer.c       |  1 +
 drivers/staging/hv/RingBuffer.h       |  2 -
 drivers/staging/hv/RndisFilter.c      |  2 +-
 drivers/staging/hv/RndisFilter.h      |  1 -
 drivers/staging/hv/StorVsc.c          |  2 +-
 drivers/staging/hv/Vmbus.c            |  1 +
 drivers/staging/hv/blkvsc_drv.c       |  1 +
 drivers/staging/hv/include/List.h     |  1 -
 drivers/staging/hv/include/VmbusApi.h |  1 -
 drivers/staging/hv/include/logging.h  |  1 -
 drivers/staging/hv/include/osd.h      | 78 -----------------------------------
 drivers/staging/hv/netvsc_drv.c       |  1 +
 drivers/staging/hv/osd.c              |  2 +-
 drivers/staging/hv/osd.h              | 78 +++++++++++++++++++++++++++++++++++
 drivers/staging/hv/storvsc_drv.c      |  2 +-
 drivers/staging/hv/vmbus_drv.c        |  2 +-
 26 files changed, 94 insertions(+), 97 deletions(-)
 delete mode 100644 drivers/staging/hv/include/osd.h
 create mode 100644 drivers/staging/hv/osd.h

(limited to 'drivers')

diff --git a/drivers/staging/hv/BlkVsc.c b/drivers/staging/hv/BlkVsc.c
index 526a0ab89975..c2e03673cf10 100644
--- a/drivers/staging/hv/BlkVsc.c
+++ b/drivers/staging/hv/BlkVsc.c
@@ -22,6 +22,7 @@
 
 #include <linux/kernel.h>
 #include <linux/mm.h>
+#include "osd.h"
 #include "StorVsc.c"
 
 static const char* gBlkDriverName="blkvsc";
diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 78850f3a32cf..5f4016154e8d 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -23,7 +23,7 @@
 
 #include <linux/kernel.h>
 #include <linux/mm.h>
-#include "include/osd.h"
+#include "osd.h"
 #include "include/logging.h"
 
 #include "VmbusPrivate.h"
diff --git a/drivers/staging/hv/Channel.h b/drivers/staging/hv/Channel.h
index c741dc1373f5..d0fd9aa62385 100644
--- a/drivers/staging/hv/Channel.h
+++ b/drivers/staging/hv/Channel.h
@@ -25,7 +25,6 @@
 #ifndef _CHANNEL_H_
 #define _CHANNEL_H_
 
-#include "include/osd.h"
 #include "ChannelMgmt.h"
 
 /* The format must be the same as VMDATA_GPA_DIRECT */
diff --git a/drivers/staging/hv/ChannelInterface.c b/drivers/staging/hv/ChannelInterface.c
index 451a1a530654..ffd62bb29146 100644
--- a/drivers/staging/hv/ChannelInterface.c
+++ b/drivers/staging/hv/ChannelInterface.c
@@ -23,8 +23,7 @@
 
 #include <linux/kernel.h>
 #include <linux/mm.h>
-#include "include/osd.h"
-
+#include "osd.h"
 #include "VmbusPrivate.h"
 
 static int
diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index ebf4f7e8847a..86ce05b4b14c 100644
--- a/drivers/staging/hv/ChannelMgmt.c
+++ b/drivers/staging/hv/ChannelMgmt.c
@@ -24,7 +24,7 @@
 
 #include <linux/kernel.h>
 #include <linux/mm.h>
-#include "include/osd.h"
+#include "osd.h"
 #include "include/logging.h"
 
 #include "VmbusPrivate.h"
diff --git a/drivers/staging/hv/ChannelMgmt.h b/drivers/staging/hv/ChannelMgmt.h
index 8b81d59b69db..34eddab6f3b4 100644
--- a/drivers/staging/hv/ChannelMgmt.h
+++ b/drivers/staging/hv/ChannelMgmt.h
@@ -25,7 +25,6 @@
 #ifndef _CHANNEL_MGMT_H_
 #define _CHANNEL_MGMT_H_
 
-#include "include/osd.h"
 #include "include/List.h"
 #include "RingBuffer.h"
 
diff --git a/drivers/staging/hv/Connection.c b/drivers/staging/hv/Connection.c
index 6b726894b31b..9083f33a4b3d 100644
--- a/drivers/staging/hv/Connection.c
+++ b/drivers/staging/hv/Connection.c
@@ -25,6 +25,7 @@
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/vmalloc.h>
+#include "osd.h"
 #include "include/logging.h"
 #include "VmbusPrivate.h"
 
diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index f706ab8f08c9..31459f76f16a 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -24,6 +24,7 @@
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/vmalloc.h>
+#include "osd.h"
 #include "include/logging.h"
 #include "VmbusPrivate.h"
 
diff --git a/drivers/staging/hv/Hv.h b/drivers/staging/hv/Hv.h
index 926213538cdc..6df388d741ae 100644
--- a/drivers/staging/hv/Hv.h
+++ b/drivers/staging/hv/Hv.h
@@ -25,8 +25,6 @@
 #ifndef __HV_H__
 #define __HV_H__
 
-#include "include/osd.h"
-
 #include "include/HvTypes.h"
 #include "include/HvStatus.h"
 #include "include/HvHalApi.h"
diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c
index 349329aea163..0389ef7bedb6 100644
--- a/drivers/staging/hv/NetVsc.c
+++ b/drivers/staging/hv/NetVsc.c
@@ -24,6 +24,7 @@
 #include <linux/mm.h>
 #include <linux/delay.h>
 #include <asm/io.h>
+#include "osd.h"
 #include "include/logging.h"
 #include "NetVsc.h"
 #include "RndisFilter.h"
diff --git a/drivers/staging/hv/RingBuffer.c b/drivers/staging/hv/RingBuffer.c
index f7332f300c45..7473f915403a 100644
--- a/drivers/staging/hv/RingBuffer.c
+++ b/drivers/staging/hv/RingBuffer.c
@@ -23,6 +23,7 @@
 
 #include <linux/kernel.h>
 #include <linux/mm.h>
+#include "osd.h"
 #include "include/logging.h"
 #include "RingBuffer.h"
 
diff --git a/drivers/staging/hv/RingBuffer.h b/drivers/staging/hv/RingBuffer.h
index 17e859fa5104..6202157e145d 100644
--- a/drivers/staging/hv/RingBuffer.h
+++ b/drivers/staging/hv/RingBuffer.h
@@ -27,8 +27,6 @@
 
 #include <linux/scatterlist.h>
 
-#include "include/osd.h"
-
 typedef struct _RING_BUFFER {
 	/* Offset in bytes from the start of ring data below */
 	volatile u32 WriteIndex;
diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c
index 5cd1575578a6..ef490f52593c 100644
--- a/drivers/staging/hv/RndisFilter.c
+++ b/drivers/staging/hv/RndisFilter.c
@@ -26,8 +26,8 @@
 #include <asm/kmap_types.h>
 #include <asm/io.h>
 
+#include "osd.h"
 #include "include/logging.h"
-
 #include "include/NetVscApi.h"
 #include "RndisFilter.h"
 
diff --git a/drivers/staging/hv/RndisFilter.h b/drivers/staging/hv/RndisFilter.h
index 6725fe525d36..8e357c8c95d1 100644
--- a/drivers/staging/hv/RndisFilter.h
+++ b/drivers/staging/hv/RndisFilter.h
@@ -27,7 +27,6 @@
 
 #define __struct_bcount(x)
 
-#include "include/osd.h"
 #include "NetVsc.h"
 
 #include "include/rndis.h"
diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c
index 47de70b0d827..32fa2914f45d 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -25,8 +25,8 @@
 #include <linux/string.h>
 #include <linux/mm.h>
 #include <linux/delay.h>
+#include "osd.h"
 #include "include/logging.h"
-
 #include "include/StorVscApi.h"
 #include "include/VmbusPacketFormat.h"
 #include "include/vstorage.h"
diff --git a/drivers/staging/hv/Vmbus.c b/drivers/staging/hv/Vmbus.c
index 50d2773053b7..2feb7c3cfae5 100644
--- a/drivers/staging/hv/Vmbus.c
+++ b/drivers/staging/hv/Vmbus.c
@@ -23,6 +23,7 @@
 
 #include <linux/kernel.h>
 #include <linux/mm.h>
+#include "osd.h"
 #include "include/logging.h"
 #include "VersionInfo.h"
 #include "VmbusPrivate.h"
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index 6888909c69e2..3107f460d9d8 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -33,6 +33,7 @@
 #include <scsi/scsi_eh.h>
 #include <scsi/scsi_dbg.h>
 
+#include "osd.h"
 #include "include/logging.h"
 #include "include/vmbus.h"
 
diff --git a/drivers/staging/hv/include/List.h b/drivers/staging/hv/include/List.h
index 31c129696435..3895c328ddd6 100644
--- a/drivers/staging/hv/include/List.h
+++ b/drivers/staging/hv/include/List.h
@@ -25,7 +25,6 @@
 #ifndef _LIST_H_
 #define _LIST_H_
 
-#include "osd.h"
 /*
  *
  *  Doubly-linked list manipulation routines.  Implemented as macros
diff --git a/drivers/staging/hv/include/VmbusApi.h b/drivers/staging/hv/include/VmbusApi.h
index 0a870855028e..442a2125470a 100644
--- a/drivers/staging/hv/include/VmbusApi.h
+++ b/drivers/staging/hv/include/VmbusApi.h
@@ -25,7 +25,6 @@
 #ifndef _VMBUS_API_H_
 #define _VMBUS_API_H_
 
-#include "osd.h"
 
 
 /* Defines */
diff --git a/drivers/staging/hv/include/logging.h b/drivers/staging/hv/include/logging.h
index 8609269ca195..74c18f1d7f4d 100644
--- a/drivers/staging/hv/include/logging.h
+++ b/drivers/staging/hv/include/logging.h
@@ -28,7 +28,6 @@
 /* #include <linux/init.h> */
 /* #include <linux/module.h> */
 
-#include "osd.h"
 
 #define VMBUS				0x0001
 #define STORVSC				0x0002
diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h
deleted file mode 100644
index 949c273e576d..000000000000
--- a/drivers/staging/hv/include/osd.h
+++ /dev/null
@@ -1,78 +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 _OSD_H_
-#define _OSD_H_
-
-
-/* Defines */
-
-
-
-#define ALIGN_UP(value, align)			( ((value) & (align-1))? ( ((value) + (align-1)) & ~(align-1) ): (value) )
-#define ALIGN_DOWN(value, align)		( (value) & ~(align-1) )
-#define NUM_PAGES_SPANNED(addr, len)	( (ALIGN_UP(addr+len, PAGE_SIZE) - ALIGN_DOWN(addr, PAGE_SIZE)) >> PAGE_SHIFT )
-
-#define LOWORD(dw)		((unsigned short) (dw))
-#define HIWORD(dw)		((unsigned short) (((unsigned int) (dw) >> 16) & 0xFFFF))
-
-typedef struct _DLIST_ENTRY {
-   struct _DLIST_ENTRY *Flink;
-   struct _DLIST_ENTRY *Blink;
-} DLIST_ENTRY;
-
-
-/* Other types */
-
-/* typedef unsigned char		GUID[16]; */
-
-typedef struct {
-	unsigned char	Data[16];
-} GUID;
-
-struct osd_waitevent {
-	int	condition;
-	wait_queue_head_t event;
-};
-
-/* Osd routines */
-
-extern void *osd_VirtualAllocExec(unsigned int size);
-
-extern void *osd_PageAlloc(unsigned int count);
-extern void osd_PageFree(void* page, unsigned int count);
-
-extern struct osd_waitevent *osd_WaitEventCreate(void);
-extern void osd_WaitEventSet(struct osd_waitevent *waitEvent);
-extern int osd_WaitEventWait(struct osd_waitevent *waitEvent);
-
-/* If >0, waitEvent got signaled. If ==0, timeout. If < 0, error */
-extern int osd_WaitEventWaitEx(struct osd_waitevent *waitEvent, u32 TimeoutInMs);
-
-
-int osd_schedule_callback(struct workqueue_struct *wq,
-			  void (*func)(void *),
-			  void *data);
-
-#endif /* _OSD_H_ */
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index 439c357c52e2..43488504a02c 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -36,6 +36,7 @@
 #include <net/sock.h>
 #include <net/pkt_sched.h>
 
+#include "osd.h"
 #include "include/logging.h"
 #include "include/vmbus.h"
 
diff --git a/drivers/staging/hv/osd.c b/drivers/staging/hv/osd.c
index f2576958f642..3b142ce96616 100644
--- a/drivers/staging/hv/osd.c
+++ b/drivers/staging/hv/osd.c
@@ -43,7 +43,7 @@
 #include <asm/kmap_types.h>
 #include <asm/atomic.h>
 
-#include "include/osd.h"
+#include "osd.h"
 
 
 /* Data types */
diff --git a/drivers/staging/hv/osd.h b/drivers/staging/hv/osd.h
new file mode 100644
index 000000000000..949c273e576d
--- /dev/null
+++ b/drivers/staging/hv/osd.h
@@ -0,0 +1,78 @@
+/*
+ *
+ * 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 _OSD_H_
+#define _OSD_H_
+
+
+/* Defines */
+
+
+
+#define ALIGN_UP(value, align)			( ((value) & (align-1))? ( ((value) + (align-1)) & ~(align-1) ): (value) )
+#define ALIGN_DOWN(value, align)		( (value) & ~(align-1) )
+#define NUM_PAGES_SPANNED(addr, len)	( (ALIGN_UP(addr+len, PAGE_SIZE) - ALIGN_DOWN(addr, PAGE_SIZE)) >> PAGE_SHIFT )
+
+#define LOWORD(dw)		((unsigned short) (dw))
+#define HIWORD(dw)		((unsigned short) (((unsigned int) (dw) >> 16) & 0xFFFF))
+
+typedef struct _DLIST_ENTRY {
+   struct _DLIST_ENTRY *Flink;
+   struct _DLIST_ENTRY *Blink;
+} DLIST_ENTRY;
+
+
+/* Other types */
+
+/* typedef unsigned char		GUID[16]; */
+
+typedef struct {
+	unsigned char	Data[16];
+} GUID;
+
+struct osd_waitevent {
+	int	condition;
+	wait_queue_head_t event;
+};
+
+/* Osd routines */
+
+extern void *osd_VirtualAllocExec(unsigned int size);
+
+extern void *osd_PageAlloc(unsigned int count);
+extern void osd_PageFree(void* page, unsigned int count);
+
+extern struct osd_waitevent *osd_WaitEventCreate(void);
+extern void osd_WaitEventSet(struct osd_waitevent *waitEvent);
+extern int osd_WaitEventWait(struct osd_waitevent *waitEvent);
+
+/* If >0, waitEvent got signaled. If ==0, timeout. If < 0, error */
+extern int osd_WaitEventWaitEx(struct osd_waitevent *waitEvent, u32 TimeoutInMs);
+
+
+int osd_schedule_callback(struct workqueue_struct *wq,
+			  void (*func)(void *),
+			  void *data);
+
+#endif /* _OSD_H_ */
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index a79ea812bf48..fc5b02d5121a 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -36,9 +36,9 @@
 
 #include <scsi/scsi_dbg.h>
 
+#include "osd.h"
 #include "include/logging.h"
 #include "include/vmbus.h"
-
 #include "include/StorVscApi.h"
 
 
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 0e13d778c003..bb40c2e15c36 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -28,7 +28,7 @@
 #include <linux/irq.h>
 #include <linux/interrupt.h>
 #include <linux/sysctl.h>
-
+#include "osd.h"
 #include "include/logging.h"
 #include "include/vmbus.h"
 
-- 
cgit v1.2.3