[poky] [KERNEL][linux-yocto PATCH 3/4] yocto/emgd: 2.6.39 fixes

Tom Zanussi tom.zanussi at intel.com
Thu May 12 15:04:16 PDT 2011


From: Tom Zanussi <tom.zanussi at intel.com>

Fixes required for migration to 2.6.39.

Signed-off-by: Tom Zanussi <tom.zanussi at intel.com>
---
 .../gpu/drm/emgd/emgd/display/mode/plb/mode_plb.c  |    2 +-
 .../gpu/drm/emgd/emgd/display/mode/tnc/mode_tnc.c  |    2 +-
 drivers/gpu/drm/emgd/emgd/drm/emgd_drv.c           |   12 ++++++------
 .../drm/emgd/pvr/services4/srvkm/common/resman.c   |    4 ----
 .../drm/emgd/pvr/services4/srvkm/env/linux/event.c |    4 ----
 .../drm/emgd/pvr/services4/srvkm/env/linux/mm.c    |    4 ----
 .../drm/emgd/pvr/services4/srvkm/env/linux/mm.h    |    4 ----
 .../drm/emgd/pvr/services4/srvkm/env/linux/mmap.c  |    4 ----
 .../emgd/pvr/services4/srvkm/env/linux/module.c    |    4 ----
 .../emgd/pvr/services4/srvkm/env/linux/mutils.c    |    3 ---
 .../emgd/pvr/services4/srvkm/env/linux/mutils.h    |    4 ----
 .../emgd/pvr/services4/srvkm/env/linux/osfunc.c    |   13 ++-----------
 .../drm/emgd/pvr/services4/srvkm/env/linux/proc.c  |    4 ----
 .../emgd/pvr/services4/srvkm/env/linux/pvr_debug.c |    6 +-----
 .../emgd/pvr/services4/srvkm/env/linux/pvr_drm.c   |    4 ----
 15 files changed, 11 insertions(+), 63 deletions(-)

diff --git a/drivers/gpu/drm/emgd/emgd/display/mode/plb/mode_plb.c b/drivers/gpu/drm/emgd/emgd/display/mode/plb/mode_plb.c
index d5eef1f..312e90a 100644
--- a/drivers/gpu/drm/emgd/emgd/display/mode/plb/mode_plb.c
+++ b/drivers/gpu/drm/emgd/emgd/display/mode/plb/mode_plb.c
@@ -73,7 +73,7 @@ static unsigned long vblank_interrupt_state = 0;
 /* Spin lock for synchronization of the vblank_interrupt_state variable,
  * between the VBlank interrupt handler and the non-interrupt handler code:
  */
-static spinlock_t vblank_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(vblank_lock);
 
 
 
diff --git a/drivers/gpu/drm/emgd/emgd/display/mode/tnc/mode_tnc.c b/drivers/gpu/drm/emgd/emgd/display/mode/tnc/mode_tnc.c
index 7bb2176..ba02586 100644
--- a/drivers/gpu/drm/emgd/emgd/display/mode/tnc/mode_tnc.c
+++ b/drivers/gpu/drm/emgd/emgd/display/mode/tnc/mode_tnc.c
@@ -84,7 +84,7 @@ static unsigned long vblank_interrupt_state = 0;
 /* Spin lock for synchronization of the vblank_interrupt_state variable,
  * between the VBlank interrupt handler and the non-interrupt handler code:
  */
-static spinlock_t vblank_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(vblank_lock);
 
 
 
diff --git a/drivers/gpu/drm/emgd/emgd/drm/emgd_drv.c b/drivers/gpu/drm/emgd/emgd/drm/emgd_drv.c
index 8f384e7..48e2cbf 100644
--- a/drivers/gpu/drm/emgd/emgd/drm/emgd_drv.c
+++ b/drivers/gpu/drm/emgd/emgd/drm/emgd_drv.c
@@ -1955,10 +1955,6 @@ static struct drm_driver driver = {
 		.poll    = drm_poll,
 		.fasync  = drm_fasync,
 	},
-	.pci_driver = {
-		.name     = DRIVER_NAME,
-		.id_table = pciidlist,
-	},
 	.name                = DRIVER_NAME,
 	.desc                = DRIVER_DESC,
 	.date                = DRIVER_DATE,
@@ -1967,6 +1963,10 @@ static struct drm_driver driver = {
 	.patchlevel          = DRIVER_PATCHLEVEL,
 };
 
+static struct pci_driver emgd_pci_driver = {
+	.name = DRIVER_NAME,
+	.id_table = pciidlist,
+};
 
 /**
  * Standard procedure to initialize this kernel module when it is loaded.
@@ -1976,7 +1976,7 @@ static int __init emgd_init(void) {
 
 	EMGD_TRACE_ENTER;
 	driver.num_ioctls = emgd_max_ioctl;
-	ret = drm_init(&driver);
+	ret = drm_pci_init(&driver, &emgd_pci_driver);
 	PVRDPFInit();
 	printk(KERN_INFO "[EMGD] drm_init() returning %d\n", ret);
 	EMGD_TRACE_EXIT;
@@ -1988,7 +1988,7 @@ static int __init emgd_init(void) {
  */
 static void __exit emgd_exit(void) {
 	EMGD_TRACE_ENTER;
-	drm_exit(&driver);
+	drm_pci_exit(&driver, &emgd_pci_driver);
 	EMGD_TRACE_EXIT;
 }
 
diff --git a/drivers/gpu/drm/emgd/pvr/services4/srvkm/common/resman.c b/drivers/gpu/drm/emgd/pvr/services4/srvkm/common/resman.c
index dcbaa4b..7bb860f 100644
--- a/drivers/gpu/drm/emgd/pvr/services4/srvkm/common/resman.c
+++ b/drivers/gpu/drm/emgd/pvr/services4/srvkm/common/resman.c
@@ -24,10 +24,6 @@
 #include "resman.h"
 
 #ifdef __linux__
-#ifndef AUTOCONF_INCLUDED
- #include <linux/config.h>
-#endif
-
 #include <linux/version.h>
 #include <linux/sched.h>
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9)
diff --git a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/event.c b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/event.c
index c1c645c..d412f47 100644
--- a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/event.c
+++ b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/event.c
@@ -20,10 +20,6 @@
  THE SOFTWARE.
  ******************************************************************************/
 
-#ifndef AUTOCONF_INCLUDED
- #include <linux/config.h>
-#endif
-
 #include <linux/version.h>
 #include <asm/io.h>
 #include <asm/page.h>
diff --git a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/mm.c b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/mm.c
index c989f46..c69e615 100644
--- a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/mm.c
+++ b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/mm.c
@@ -20,10 +20,6 @@
  THE SOFTWARE.
  ******************************************************************************/
 
-#ifndef AUTOCONF_INCLUDED
- #include <linux/config.h>
-#endif
-
 #include <linux/version.h>
 #include <linux/mm.h>
 #include <linux/vmalloc.h>
diff --git a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/mm.h b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/mm.h
index 35c51c6..6714b3c 100644
--- a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/mm.h
+++ b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/mm.h
@@ -23,10 +23,6 @@
 #ifndef __IMG_LINUX_MM_H__
 #define __IMG_LINUX_MM_H__
 
-#ifndef AUTOCONF_INCLUDED
- #include <linux/config.h>
-#endif
-
 #include <linux/version.h>
 #include <linux/slab.h>
 #include <linux/mm.h>
diff --git a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/mmap.c b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/mmap.c
index aabe488..c3264e3 100644
--- a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/mmap.c
+++ b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/mmap.c
@@ -20,10 +20,6 @@
  THE SOFTWARE.
  ******************************************************************************/
 
-#ifndef AUTOCONF_INCLUDED
- #include <linux/config.h>
-#endif
-
 #include <linux/version.h>
 #include <linux/mm.h>
 #include <linux/module.h>
diff --git a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/module.c b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/module.c
index 73b6f69..f6d4114 100644
--- a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/module.c
+++ b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/module.c
@@ -20,10 +20,6 @@
  THE SOFTWARE.
  ******************************************************************************/
 
-#ifndef AUTOCONF_INCLUDED
- #include <linux/config.h>
-#endif
-
 #if !defined(SUPPORT_DRI_DRM)
 	
 	#if defined(LDM_PLATFORM)
diff --git a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/mutils.c b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/mutils.c
index 5ee3a01..cfd1f02 100644
--- a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/mutils.c
+++ b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/mutils.c
@@ -20,9 +20,6 @@
  THE SOFTWARE.
  ******************************************************************************/
 
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
 #include <linux/version.h>
 
 #include <linux/spinlock.h>
diff --git a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/mutils.h b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/mutils.h
index 10473fa..ebc8a32 100644
--- a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/mutils.h
+++ b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/mutils.h
@@ -23,10 +23,6 @@
 #ifndef __IMG_LINUX_MUTILS_H__
 #define __IMG_LINUX_MUTILS_H__
 
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
-
 #include <linux/version.h>
 
 #if !(defined(__i386__) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)))
diff --git a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/osfunc.c b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/osfunc.c
index 96daf23..4f03922 100644
--- a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/osfunc.c
+++ b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/osfunc.c
@@ -20,10 +20,6 @@
  THE SOFTWARE.
  ******************************************************************************/
 
-#ifndef AUTOCONF_INCLUDED
- #include <linux/config.h>
-#endif
-
 #include <linux/version.h>
 #include <asm/io.h>
 #include <asm/page.h>
@@ -1692,12 +1688,7 @@ PVRSRV_ERROR OSPCIResumeDev(PVRSRV_PCI_DEV_HANDLE hPVRPCI)
             return PVRSRV_ERROR_GENERIC;
     }
 
-    err = pci_restore_state(psPVRPCI->psPCIDev);
-    if (err != 0)
-    {
-        PVR_DPF((PVR_DBG_ERROR, "OSPCIResumeDev: pci_restore_state failed (%d)", err));
-        return PVRSRV_ERROR_GENERIC;
-    }
+    pci_restore_state(psPVRPCI->psPCIDev);
 
     err = pci_enable_device(psPVRPCI->psPCIDev);
     if (err != 0)
@@ -1752,7 +1743,7 @@ static TIMER_CALLBACK_DATA sTimers[OS_MAX_TIMERS];
 #if defined(PVR_LINUX_TIMERS_USING_WORKQUEUES)
 DEFINE_MUTEX(sTimerStructLock);
 #else
-static spinlock_t sTimerStructLock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(sTimerStructLock);
 #endif
 
 static void OSTimerCallbackBody(TIMER_CALLBACK_DATA *psTimerCBData)
diff --git a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/proc.c b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/proc.c
index 85d2266..a7f8850 100644
--- a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/proc.c
+++ b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/proc.c
@@ -20,10 +20,6 @@
  THE SOFTWARE.
  ******************************************************************************/
 
-#ifndef AUTOCONF_INCLUDED
- #include <linux/config.h>
-#endif
-
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/version.h>
diff --git a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/pvr_debug.c b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/pvr_debug.c
index 28ad7cc..d7a9e9f 100644
--- a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/pvr_debug.c
+++ b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/pvr_debug.c
@@ -21,10 +21,6 @@
  ******************************************************************************/
 
   
-#ifndef AUTOCONF_INCLUDED
- #include <linux/config.h>
-#endif
-
 #include <asm/io.h>
 #include <asm/uaccess.h>
 #include <linux/kernel.h>
@@ -56,7 +52,7 @@ static IMG_CHAR gszBufferIRQ[PVR_MAX_MSG_LEN + 1];
 
 static struct mutex gsDebugMutexNonIRQ;
 
-static spinlock_t gsDebugLockIRQ = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(gsDebugLockIRQ);
 
 #define	USE_SPIN_LOCK (in_interrupt() || !preemptible())
 
diff --git a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/pvr_drm.c b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/pvr_drm.c
index 62b3ab0..c8c27f3 100644
--- a/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/pvr_drm.c
+++ b/drivers/gpu/drm/emgd/pvr/services4/srvkm/env/linux/pvr_drm.c
@@ -22,10 +22,6 @@
 
 #if defined(SUPPORT_DRI_DRM)
 
-#ifndef AUTOCONF_INCLUDED
- #include <linux/config.h>
-#endif
-
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-- 
1.7.0.4




More information about the poky mailing list