/* --------------- 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)
     return 1;
 }
 
-#endif
 
 
 
 
 #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_
 
 #define NewScratch
 #endif
 /* shampoo */
-#ifdef LINUX_KERNEL
+
 #define SEQ_ADDRESS_PORT         0x0014
 #define SEQ_DATA_PORT            0x0015
 #define MISC_OUTPUT_REG_READ_PORT 0x001C
 #define CRTC_ADDRESS_PORT_COLOR   0x0024
 #define VIDEO_SUBSYSTEM_ENABLE_PORT 0x0013
 #define PCI_COMMAND            0x04
-#endif
+
 /* ~shampoo */
 
 
 
 #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"
 
 #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"
 #include "vb_ext.h"
 
 
-#ifdef LINUX_KERNEL
 #include <asm/io.h>
-#endif
 
 
 
 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 */
 }
 
 
-
-#if defined(LINUX_KERNEL)
 void XGINew_InitVBIOSData(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo)
 {
 
        }
 
 }
-#endif /* For Linux */
 
 /* --------------------------------------------------------------------- */
 /* Function : ReadVBIOSTablData */
 
 
 
 
-#ifdef LINUX_KERNEL
 #include <asm/io.h>
 #include <linux/types.h>
 #include <linux/version.h>
 #include "XGIfb.h"
-#endif
 
 
 #include "vb_def.h"
 
 #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 ) ;
 
 
 
-#ifdef LINUX_KERNEL
-#endif
     }
 }
 
 
 
 #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
 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,