drm: move some of the OS stuff into the OS header
authorDave Airlie <airlied@linux.ie>
Mon, 5 Nov 2007 02:10:52 +0000 (12:10 +1000)
committerDave Airlie <airlied@linux.ie>
Mon, 5 Nov 2007 02:11:39 +0000 (12:11 +1000)
linux-core/drmP.h
linux-core/drm_os_linux.h

index c014eddfdd81ad386a99543dfc8b77e204faa893..759d25753b9da05e143f15d442c38130696d1717 100644 (file)
@@ -1288,19 +1288,5 @@ static inline void drm_ctl_free(void *pt, size_t size, int area)
 
 /*@}*/
 
-/** Type for the OS's non-sleepable mutex lock */
-#define DRM_SPINTYPE           spinlock_t
-/**
- * Initialize the lock for use.  name is an optional string describing the
- * lock
- */
-#define DRM_SPININIT(l,name)   spin_lock_init(l)
-#define DRM_SPINUNINIT(l)
-#define DRM_SPINLOCK(l)                spin_lock(l)
-#define DRM_SPINUNLOCK(l)      spin_unlock(l)
-#define DRM_SPINLOCK_IRQSAVE(l, _flags)        spin_lock_irqsave(l, _flags);
-#define DRM_SPINUNLOCK_IRQRESTORE(l, _flags) spin_unlock_irqrestore(l, _flags);
-#define DRM_SPINLOCK_ASSERT(l)         do {} while (0) 
-
 #endif                         /* __KERNEL__ */
 #endif
index 2688479a9b761e87a6bb12850fd9b59b762e7468..84c294e1db05286a411c4d598ebc861b98336410 100644 (file)
@@ -129,3 +129,18 @@ do {                                                               \
 
 #define DRM_WAKEUP( queue ) wake_up_interruptible( queue )
 #define DRM_INIT_WAITQUEUE( queue ) init_waitqueue_head( queue )
+
+/** Type for the OS's non-sleepable mutex lock */
+#define DRM_SPINTYPE           spinlock_t
+/**
+ * Initialize the lock for use.  name is an optional string describing the
+ * lock
+ */
+#define DRM_SPININIT(l,name)   spin_lock_init(l)
+#define DRM_SPINUNINIT(l)
+#define DRM_SPINLOCK(l)                spin_lock(l)
+#define DRM_SPINUNLOCK(l)      spin_unlock(l)
+#define DRM_SPINLOCK_IRQSAVE(l, _flags)        spin_lock_irqsave(l, _flags);
+#define DRM_SPINUNLOCK_IRQRESTORE(l, _flags) spin_unlock_irqrestore(l, _flags);
+#define DRM_SPINLOCK_ASSERT(l)         do {} while (0)
+