Staging: xgifb: Remove use of LINUX_KERNEL define
authorBill Pemberton <wfp5p@virginia.edu>
Thu, 17 Jun 2010 17:10:39 +0000 (13:10 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 22 Jun 2010 21:20:44 +0000 (14:20 -0700)
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/xgifb/XGI_main_26.c
drivers/staging/xgifb/osdef.h
drivers/staging/xgifb/vb_def.h
drivers/staging/xgifb/vb_ext.c
drivers/staging/xgifb/vb_init.c
drivers/staging/xgifb/vb_setmode.c
drivers/staging/xgifb/vb_util.c
drivers/staging/xgifb/vgatypes.h

index f2658c41b7d63cac0b58fb95b8c6d2ab74e9dbb9..e9551d347a887c5fb5183643f65fdf9974f7e628 100644 (file)
@@ -163,7 +163,6 @@ struct video_info  xgi_video_info;
 
 /* --------------- Hardware Access Routines -------------------------- */
 
-#ifdef LINUX_KERNEL
 int
 XGIfb_mode_rate_to_dclock(VB_DEVICE_INFO *XGI_Pr, PXGI_HW_DEVICE_INFO HwDeviceExtension,
                          unsigned char modeno, unsigned char rateindex)
@@ -389,7 +388,6 @@ XGIfb_mode_rate_to_ddata(VB_DEVICE_INFO *XGI_Pr, PXGI_HW_DEVICE_INFO HwDeviceExt
     return 1;
 }
 
-#endif
 
 
 
index ffb683819e41f3e494b10c9307c7c22e4772b956..fb1d41149caac31b35a9719db690dd9e4e7d6e49 100644 (file)
@@ -1,30 +1,9 @@
 #ifndef _OSDEF_H_
 #define _OSDEF_H_
 
-#define LINUX_KERNEL
-
-/**********************************************************************/
-#ifdef LINUX_KERNEL
-//#include <linux/config.h>
-#endif
-
-
-/**********************************************************************/
-#ifdef LINUX_KERNEL
-#define LINUX
-#endif
-
-/**********************************************************************/
-#ifdef LINUX_KERNEL
 #define XGI_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize)
-#endif
-/**********************************************************************/
-
-/**********************************************************************/
 
-#ifdef LINUX_KERNEL
 #define XGI_MemoryCopy(Destination,Soruce,Length) memcpy(Destination,Soruce,Length)
-#endif
 
 /**********************************************************************/
 
 #undef InPortLong
 #endif /* InPortLong */
 
-/**********************************************************************/
-/*  TC                                                                */
-/**********************************************************************/
-
-
-/**********************************************************************/
-/*  LINUX XF86                                                        */
-/**********************************************************************/
-
-
-#ifdef LINUX_KERNEL
 #define OutPortByte(p,v) outb((u8)(v),(p))
 #define OutPortWord(p,v) outw((u16)(v),(p))
 #define OutPortLong(p,v) outl((u32)(v),(p))
 #define InPortByte(p)    inb(p)
 #define InPortWord(p)    inw(p)
 #define InPortLong(p)    inl(p)
-#endif
-
-/**********************************************************************/
-/*  WIN 2000                                                          */
-/**********************************************************************/
-
-
-
-/**********************************************************************/
-/*  WIN CE                                                          */
-/**********************************************************************/
 
 #endif // _OSDEF_H_
index 17a7ada4926e9a77cddce679c198e810eead4374..4de182b23d414816b9da2ad3e9446e76c831a99f 100644 (file)
@@ -6,7 +6,7 @@
 #define NewScratch
 #endif
 /* shampoo */
-#ifdef LINUX_KERNEL
+
 #define SEQ_ADDRESS_PORT         0x0014
 #define SEQ_DATA_PORT            0x0015
 #define MISC_OUTPUT_REG_READ_PORT 0x001C
@@ -17,7 +17,7 @@
 #define CRTC_ADDRESS_PORT_COLOR   0x0024
 #define VIDEO_SUBSYSTEM_ENABLE_PORT 0x0013
 #define PCI_COMMAND            0x04
-#endif
+
 /* ~shampoo */
 
 
index 68355851379944a093b7437ba526ce0a50f3d3aa..f4969c2ced61c0b2473a3f1c724e71199f27533a 100644 (file)
@@ -1,18 +1,9 @@
 #include "osdef.h"
 
-
-
-
-
-
-#ifdef LINUX_KERNEL
 #include <linux/version.h>
 #include <asm/io.h>
 #include <linux/types.h>
 #include "XGIfb.h"
-#endif
-
-
 
 #include "vb_def.h"
 #include "vgatypes.h"
index d3201d2470f1ea62c23b1736da955952f87cb10a..94fa48b9f9f5c1bab896709797855eefacdd87db 100644 (file)
@@ -1,19 +1,10 @@
 #include "osdef.h"
 #include "vgatypes.h"
 
-
-#ifdef LINUX_KERNEL
 #include <linux/version.h>
 #include <linux/types.h>
 #include <linux/delay.h> /* udelay */
 #include "XGIfb.h"
-/*#if LINUX_VERSxION_CODE >= KERNEL_VERSION(2,5,0)
-#include <video/XGIfb.h>
-#else
-#include <linux/XGIfb.h>
-#endif */
-#endif
-
 
 #include "vb_def.h"
 #include "vb_struct.h"
@@ -23,9 +14,7 @@
 #include "vb_ext.h"
 
 
-#ifdef LINUX_KERNEL
 #include <asm/io.h>
-#endif
 
 
 
@@ -120,13 +109,11 @@ UCHAR    GetXG21FPBits(PVB_DEVICE_INFO pVBInfo);
 void     XGINew_GetXG27Sense(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo) ;
 UCHAR    GetXG27FPBits(PVB_DEVICE_INFO pVBInfo);
 
-
-#ifdef LINUX_KERNEL
 void DelayUS(ULONG MicroSeconds)
 {
        udelay(MicroSeconds);
 }
-#endif
+
 
 /* --------------------------------------------------------------------- */
 /* Function : XGIInitNew */
@@ -2667,8 +2654,6 @@ void SetPowerConsume ( PXGI_HW_DEVICE_INFO HwDeviceExtension , ULONG XGI_P3d4Por
 }
 
 
-
-#if defined(LINUX_KERNEL)
 void XGINew_InitVBIOSData(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo)
 {
 
@@ -2711,7 +2696,6 @@ void XGINew_InitVBIOSData(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO
        }
 
 }
-#endif /* For Linux */
 
 /* --------------------------------------------------------------------- */
 /* Function : ReadVBIOSTablData */
index 5078788f48d03cf465de2fb87f6f4d21743cd958..daf7b3c739c0eb4311fcbbb40c076363cde0a1c6 100644 (file)
@@ -3,12 +3,10 @@
 
 
 
-#ifdef LINUX_KERNEL
 #include <asm/io.h>
 #include <linux/types.h>
 #include <linux/version.h>
 #include "XGIfb.h"
-#endif
 
 
 #include "vb_def.h"
index b9ccce07073827e767ec78dbc05da66992cd5be1..753b1c5507274ef34543e063c26dbc5c3a6922a0 100644 (file)
@@ -3,11 +3,9 @@
 #include "vgatypes.h"
 #include "vb_struct.h"
 
-#ifdef LINUX_KERNEL
 #include "XGIfb.h"
 #include <asm/io.h>
 #include <linux/types.h>
-#endif
 
 void XGINew_SetReg1( ULONG , USHORT , USHORT ) ;
 void XGINew_SetReg2( ULONG , USHORT , USHORT ) ;
@@ -188,8 +186,6 @@ void NewDelaySeconds( int seconds )
 
 
 
-#ifdef LINUX_KERNEL
-#endif
     }
 }
 
index 256ef26c278924eba61d3acacd4ff1b000d26df4..745c993e057ea38dc05799aad79c67f59bafe29d 100644 (file)
@@ -4,10 +4,7 @@
 
 #include "osdef.h"
 
-
-#ifdef LINUX_KERNEL  /* We don't want the X driver to depend on kernel source */
 #include <linux/ioctl.h>
-#endif
 
 #ifndef FALSE
 #define FALSE   0
@@ -73,45 +70,13 @@ typedef UCHAR BOOLEAN;
 typedef UCHAR bool;
 #endif
 */
-#ifdef LINUX_KERNEL
 typedef unsigned long XGIIOADDRESS;
-#endif
 
 
 #ifndef VBIOS_VER_MAX_LENGTH
 #define VBIOS_VER_MAX_LENGTH    4
 #endif
 
-#ifndef LINUX_KERNEL   /* For the linux kernel, this is defined in xgifb.h */
-#ifndef XGI_CHIP_TYPE
-typedef enum _XGI_CHIP_TYPE {
-    XGI_VGALegacy = 0,
-    XGI_300,
-    XGI_630,
-    XGI_640,
-    XGI_315H,
-    XGI_315,
-    XGI_315PRO,
-    XGI_550,
-    XGI_650,
-    XGI_650M,
-    XGI_740,
-    XGI_330,
-    XGI_661,
-    XGI_660,
-    XGI_760,
-    XG40 = 32,
-    XG41,
-    XG42,
-    XG45,
-    XG20 = 48,
-    XG21,
-    XG27,
-    MAX_XGI_CHIP
-} XGI_CHIP_TYPE;
-#endif
-#endif
-
 #ifndef XGI_VB_CHIP_TYPE
 typedef enum _XGI_VB_CHIP_TYPE {
     VB_CHIP_Legacy = 0,