pm3fb: remove kernel 2.2 code (fwd)
PATCH 1/1 pm3fb: remove kernel 2.2 code (fwd)
FYI:
The patch forwarded below still applies against 2.6.9-mm1 (yew, I know the driver is marked as BROKEN).
----- Forwarded message from Adrian Bunk <[email protected]> -----
Date: Sun, 8 Feb 2004 02:06:09 +0100
From: Adrian Bunk <[email protected]>
To: James Simmons <[email protected]>, Andrew Morton <[email protected]>
Cc: [email protected]
Subject: [2.6 patch] pm3fb: remove kernel 2.2 code
The patch below removes kernel 2.2 code from pm3fb.{c,h}.
It also removes KERNEL_2_4 and KERNEL_2_5 since all places where this was used had a
#if (defined KERNEL_2_4) || (defined KERNEL_2_5)
diffstat output:
drivers/video/pm3fb.c | 287 +++++++----------------------------------- include/video/pm3fb.h | 40 ----- 2 files changed, 54 insertions(+), 273 deletions(-)
Please apply
Adrian
include/video/pm3fb.h renamed from include/video/pm3fb.h.old +1 -39
@@ -1119,34 +1119,6 @@/* ***** pm3fb useful define and macro ***** */ /* ***************************************** */ -/* kernel -specific definitions */ -/* what kernel is this ? */ -#if ((LINUX_VERSION_CODE >=KERNEL_VERSION (2 ,5 ,0 )) && (LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,0 ))) -#define KERNEL_2_5 -#endif - -#if ((LINUX_VERSION_CODE >=KERNEL_VERSION (2 ,4 ,0 )) && (LINUX_VERSION_CODE <KERNEL_VERSION (2 ,5 ,0 ))) -#define KERNEL_2_4 -#endif - -#if ((LINUX_VERSION_CODE >=KERNEL_VERSION (2 ,2 ,0 )) && (LINUX_VERSION_CODE <KERNEL_VERSION (2 ,3 ,0 ))) -#define KERNEL_2_2 -/* pci_resource_start, available in 2.2.18 */ -#include <linux/kcomp.h> -#ifdef CONFIG_FB_OF -#define SUPPORT_FB_OF -#endif -#endif - -#if (!defined(KERNEL_2_2 )) && (!defined(KERNEL_2_4 )) && (!defined(KERNEL_2_5 )) -#error "Only kernel 2.2.x, kernel 2.4.y and kernel 2.5.z might work" -#endif - -/* not sure if/why it's needed. doesn't work without on my PowerMac... */ -#ifdef __BIG_ENDIAN -#define MUST_BYTESWAP -#endif -/* permedia3 -specific definitions */ #define PM3_SCALE_TO_CLOCK (pr, fe, po) ((2 * PM3_REF_CLOCK * fe) / (pr * (1 << (po))))
@@ -1203,19 +1175,9 @@/* ******************************************** */ /* ***** A bunch of register-access macro ***** */ /* ******************************************** */ -#ifdef KERNEL_2_2 -#ifdef MUST_BYTESWAP /* we are writing big_endian to big_endian through a little_endian macro */ -#define PM3_READ_REG (r) __swab32(readl((l_fb_info->vIOBase + r))) -#define PM3_WRITE_REG (r, v) writel(__swab32(v), (l_fb_info->vIOBase + r)) -#else /* MUST_BYTESWAP */ -#define PM3_WRITE_REG (r, v) writel(v, (l_fb_info->vIOBase + r)) -#define PM3_READ_REG (r) readl((l_fb_info->vIOBase + r)) -#endif /* MUST_BYTESWAP */ -#endif /* KERNEL_2_2 */ -#if (definedKERNEL_2_4 ) || (definedKERNEL_2_5 )/* native-endian access */ +#define PM3_WRITE_REG (r, v) fb_writel(v, (l_fb_info->vIOBase + r))#define PM3_READ_REG (r) fb_readl((l_fb_info->vIOBase + r)) -#endif /* KERNEL_2_4 or KERNEL_2_5 */ #define depth2bpp (d) ((d + 7L) & ~7L)
drivers/video/pm3fb.c renamed from drivers/video/pm3fb.c.old +53 -234
383 lines not on this page · raw message
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
----- End forwarded message -----