From 84a73370829767534f75ffdf236fdb455eab4879 Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Sun, 25 Mar 2012 02:38:05 +0200 Subject: [PATCH] random kernel version compatibility hacks --- Kbuild | 3 +++ services4/3rdparty/bufferclass_ti/bc_cat.c | 3 ++- services4/3rdparty/dc_omap3430_linux/Kbuild | 4 ++++ services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c | 4 ++++ services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c | 4 +++- services4/srvkm/env/linux/osfunc.c | 3 ++- services4/system/omap3430/sysutils_linux.c | 3 ++- 7 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Kbuild b/Kbuild index 3ca2fc8..81043c1 100644 --- a/Kbuild +++ b/Kbuild @@ -61,4 +61,7 @@ obj-y := services4/3rdparty/dc_omap3430_linux/ endif obj-y += services4/3rdparty/bufferclass_ti/ +ifeq ($(VERSION), 3) +export EXTRA_CFLAGS += -DAUTOCONF_INCLUDED +endif diff --git a/services4/3rdparty/bufferclass_ti/bc_cat.c b/services4/3rdparty/bufferclass_ti/bc_cat.c index 0b9f6e0..879e78f 100644 --- a/services4/3rdparty/bufferclass_ti/bc_cat.c +++ b/services4/3rdparty/bufferclass_ti/bc_cat.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -492,7 +493,7 @@ static int __init bc_cat_init(void) #ifdef PLAT_TI8168 width_align = 8; #else - width_align = cpu_is_omap3530() && omap_rev_lt_3_0() ? 32 : 8; + width_align = cpu_is_omap3530() && ( omap_rev() < OMAP3430_REV_ES3_0 ) ? 32 : 8; #endif major = register_chrdev(0, DEVNAME, &bc_cat_fops); diff --git a/services4/3rdparty/dc_omap3430_linux/Kbuild b/services4/3rdparty/dc_omap3430_linux/Kbuild index eca3626..fb3602f 100755 --- a/services4/3rdparty/dc_omap3430_linux/Kbuild +++ b/services4/3rdparty/dc_omap3430_linux/Kbuild @@ -12,5 +12,9 @@ EXTRA_CFLAGS = -DLINUX \ -I$(PVR_BUILD_DIR)/services4/system/include \ $(SYS_CFLAGS.1) \ +ifeq ($(VERSION), 3) +export EXTRA_CFLAGS += -DAUTOCONF_INCLUDED +endif + obj-m := omaplfb.o omaplfb-y := omaplfb_displayclass.o omaplfb_linux.o diff --git a/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c b/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c index 349beb5..0e6802d 100644 --- a/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c +++ b/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c @@ -38,6 +38,10 @@ #include "kerneldisplay.h" #include "omaplfb.h" +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) +#define acquire_console_sem console_lock +#define release_console_sem console_unlock +#endif static void *gpvAnchor; static int fb_idx = 0; diff --git a/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c b/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c index 91254af..61a3686 100644 --- a/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c +++ b/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c @@ -56,7 +56,9 @@ extern int omap_dispc_request_irq(unsigned long, void (*)(void *), void *); extern void omap_dispc_free_irq(unsigned long, void (*)(void *), void *); extern void omap_dispc_set_plane_base(int plane, IMG_UINT32 phys_addr); #else -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,32)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0)) +#include