From bddc977e5146498c7d8c7c8acf130b90627ffd85 Mon Sep 17 00:00:00 2001
From: Erik Gilling <konkers@android.com>
Date: Tue, 14 Jun 2011 11:24:49 -0700
Subject: Revert "gpu: pvr: 2.6.39 fixups"

This reverts commit 94a283e36ed6e57579245762e253e47cfbf66501.
Signed-off-by: Erik Gilling <konkers@android.com>
---
 drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c |  8 ++++----
 drivers/gpu/pvr/omaplfb/omaplfb_linux.c        | 16 ++++++++--------
 drivers/gpu/pvr/pvr_debug.c                    |  2 +-
 3 files changed, 13 insertions(+), 13 deletions(-)

(limited to 'drivers/gpu')

diff --git a/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c b/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
index c21e2f6..962dc30 100644
--- a/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
+++ b/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
@@ -830,7 +830,7 @@ static OMAPLFB_ERROR OMAPLFBInitFBDev(OMAPLFB_DEVINFO *psDevInfo)
 	unsigned long ulLCM;
 	unsigned uiFBDevID = psDevInfo->uiFBDevID;
 
-	console_lock();
+	acquire_console_sem();
 
 	psLINFBInfo = registered_fb[uiFBDevID];
 	if (psLINFBInfo == NULL)
@@ -975,7 +975,7 @@ static OMAPLFB_ERROR OMAPLFBInitFBDev(OMAPLFB_DEVINFO *psDevInfo)
 ErrorModPut:
 	module_put(psLINFBOwner);
 ErrorRelSem:
-	console_unlock();
+	release_console_sem();
 
 	return eError;
 }
@@ -985,7 +985,7 @@ static void OMAPLFBDeInitFBDev(OMAPLFB_DEVINFO *psDevInfo)
 	struct fb_info *psLINFBInfo = psDevInfo->psLINFBInfo;
 	struct module *psLINFBOwner;
 
-	console_lock();
+	acquire_console_sem();
 
 	psLINFBOwner = psLINFBInfo->fbops->owner;
 
@@ -996,7 +996,7 @@ static void OMAPLFBDeInitFBDev(OMAPLFB_DEVINFO *psDevInfo)
 
 	module_put(psLINFBOwner);
 
-	console_unlock();
+	release_console_sem();
 }
 
 static OMAPLFB_DEVINFO *OMAPLFBInitDev(unsigned uiFBDevID)
diff --git a/drivers/gpu/pvr/omaplfb/omaplfb_linux.c b/drivers/gpu/pvr/omaplfb/omaplfb_linux.c
index 8aae8f5..7e247f5 100644
--- a/drivers/gpu/pvr/omaplfb/omaplfb_linux.c
+++ b/drivers/gpu/pvr/omaplfb/omaplfb_linux.c
@@ -214,7 +214,7 @@ static void WorkQueueHandler(struct work_struct *psWork)
 OMAPLFB_ERROR OMAPLFBCreateSwapQueue(OMAPLFB_SWAPCHAIN *psSwapChain)
 {
 	
-	psSwapChain->psWorkQueue = alloc_ordered_workqueue(DEVNAME, WQ_NON_REENTRANT | WQ_FREEZABLE | WQ_HIGHPRI);
+	psSwapChain->psWorkQueue = __create_workqueue(DEVNAME, 1, 1, 1);
 	if (psSwapChain->psWorkQueue == NULL)
 	{
 		printk(KERN_ERR DRIVER_PREFIX ": %s: Device %u: create_singlethreaded_workqueue failed\n", __FUNCTION__, psSwapChain->uiFBDevID);
@@ -241,7 +241,7 @@ void OMAPLFBFlip(OMAPLFB_DEVINFO *psDevInfo, OMAPLFB_BUFFER *psBuffer)
 	int res;
 	unsigned long ulYResVirtual;
 
-	console_lock();
+	acquire_console_sem();
 
 	sFBVar = psDevInfo->psLINFBInfo->var;
 
@@ -277,7 +277,7 @@ void OMAPLFBFlip(OMAPLFB_DEVINFO *psDevInfo, OMAPLFB_BUFFER *psBuffer)
 		}
 	}
 #endif
-	console_unlock();
+	release_console_sem();
 }
 
 #if !defined(PVR_OMAPLFB_DRM_FB) || defined(DEBUG)
@@ -555,7 +555,7 @@ OMAPLFB_BOOL OMAPLFBSetUpdateMode(OMAPLFB_DEVINFO *psDevInfo, OMAPLFB_UPDATE_MOD
 	res = psDSSDrv->set_update_mode(psDSSDev, eDSSMode);
 	if (res != 0)
 	{
-		DEBUG_PRINTK((KERN_WARNING DRIVER_PREFIX ": %s: Device %u: set_update_mode (%s) failed (%d)\n", __FUNCTION__, psDevInfo->uiFBDevID, ""/*OMAPLFBDSSUpdateModeToString(eDSSMode)*/, res));
+		DEBUG_PRINTK((KERN_WARNING DRIVER_PREFIX ": %s: Device %u: set_update_mode (%s) failed (%d)\n", __FUNCTION__, psDevInfo->uiFBDevID, OMAPLFBDSSUpdateModeToString(eDSSMode), res));
 	}
 
 	return (res == 0);
@@ -691,9 +691,9 @@ OMAPLFB_ERROR OMAPLFBUnblankDisplay(OMAPLFB_DEVINFO *psDevInfo)
 {
 	int res;
 
-	console_lock();
+	acquire_console_sem();
 	res = fb_blank(psDevInfo->psLINFBInfo, 0);
-	console_unlock();
+	release_console_sem();
 	if (res != 0 && res != -EINVAL)
 	{
 		printk(KERN_ERR DRIVER_PREFIX
@@ -708,9 +708,9 @@ OMAPLFB_ERROR OMAPLFBUnblankDisplay(OMAPLFB_DEVINFO *psDevInfo)
 
 static void OMAPLFBBlankDisplay(OMAPLFB_DEVINFO *psDevInfo)
 {
-	console_lock();
+	acquire_console_sem();
 	fb_blank(psDevInfo->psLINFBInfo, 1);
-	console_unlock();
+	release_console_sem();
 }
 
 static void OMAPLFBEarlySuspendHandler(struct early_suspend *h)
diff --git a/drivers/gpu/pvr/pvr_debug.c b/drivers/gpu/pvr/pvr_debug.c
index 44c7be7..c114e5f 100644
--- a/drivers/gpu/pvr/pvr_debug.c
+++ b/drivers/gpu/pvr/pvr_debug.c
@@ -76,7 +76,7 @@ static IMG_CHAR gszBufferIRQ[PVR_MAX_MSG_LEN + 1];
 static PVRSRV_LINUX_MUTEX gsDebugMutexNonIRQ;
 
  
-static DEFINE_SPINLOCK(gsDebugLockIRQ);
+static spinlock_t gsDebugLockIRQ = SPIN_LOCK_UNLOCKED;
 
 #if !defined (USE_SPIN_LOCK)  
 #define	USE_SPIN_LOCK (in_interrupt() || !preemptible())
-- 
cgit v1.1