diff options
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 d5eef1f4f3da..312e90a2519d 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 7bb21766663b..ba02586d85f0 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 8f384e74f341..48e2cbf16707 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 dcbaa4baa2f7..7bb860fd524b 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 c1c645cb4371..d412f47af436 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 c989f4678fcc..c69e61502a38 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 35c51c649d34..6714b3ce6dbc 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 aabe488765ae..c3264e34ec30 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 73b6f69e46c5..f6d411478b36 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 5ee3a0125dbd..cfd1f02ebb38 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 10473fac734a..ebc8a32a6c1c 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 96daf237d360..4f03922ebfa4 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 85d226646eeb..a7f885081f2b 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 28ad7ccd025c..d7a9e9f20a0b 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 62b3ab08cb76..c8c27f30c372 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> |