提交 1e59f711 编写于 作者: B Bill Pemberton 提交者: Greg Kroah-Hartman

Staging: xgifb: Remove port macros in osdef.h

The port related macros in osdef.h are replaced with calls to out?()
and in?().  This removes the last macros defined in osdef.h, so this
file is no longer needed.
Signed-off-by: NBill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 cc75bb02
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
#include <asm/mtrr.h> #include <asm/mtrr.h>
#endif #endif
#include "osdef.h"
#include "vgatypes.h" #include "vgatypes.h"
#include "vb_struct.h" #include "vb_struct.h"
#include "XGIfb.h" #include "XGIfb.h"
......
...@@ -29,8 +29,6 @@ ...@@ -29,8 +29,6 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include "osdef.h"
#ifndef XGIFB_PAN #ifndef XGIFB_PAN
#define XGIFB_PAN #define XGIFB_PAN
......
#ifndef _OSDEF_H_
#define _OSDEF_H_
/**********************************************************************/
#ifdef OutPortByte
#undef OutPortByte
#endif /* OutPortByte */
#ifdef OutPortWord
#undef OutPortWord
#endif /* OutPortWord */
#ifdef OutPortLong
#undef OutPortLong
#endif /* OutPortLong */
#ifdef InPortByte
#undef InPortByte
#endif /* InPortByte */
#ifdef InPortWord
#undef InPortWord
#endif /* InPortWord */
#ifdef InPortLong
#undef InPortLong
#endif /* InPortLong */
#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 // _OSDEF_H_
#include "osdef.h"
#include <linux/version.h> #include <linux/version.h>
#include <asm/io.h> #include <asm/io.h>
#include <linux/types.h> #include <linux/types.h>
......
#include "osdef.h"
#include "vgatypes.h" #include "vgatypes.h"
#include <linux/version.h> #include <linux/version.h>
......
#include "osdef.h"
#include <asm/io.h> #include <asm/io.h>
#include <linux/types.h> #include <linux/types.h>
......
#include "osdef.h"
#include "vb_def.h" #include "vb_def.h"
#include "vgatypes.h" #include "vgatypes.h"
#include "vb_struct.h" #include "vb_struct.h"
...@@ -28,8 +27,8 @@ void XGINew_SetRegAND(ULONG Port,USHORT Index,USHORT DataAND); ...@@ -28,8 +27,8 @@ void XGINew_SetRegAND(ULONG Port,USHORT Index,USHORT DataAND);
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
void XGINew_SetReg1( ULONG port , USHORT index , USHORT data ) void XGINew_SetReg1( ULONG port , USHORT index , USHORT data )
{ {
OutPortByte( port , index ) ; outb(index, port);
OutPortByte( port + 1 , data ) ; outb(data, port + 1);
} }
...@@ -56,7 +55,7 @@ void XGINew_SetReg1( ULONG port , USHORT index , USHORT data ) ...@@ -56,7 +55,7 @@ void XGINew_SetReg1( ULONG port , USHORT index , USHORT data )
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
void XGINew_SetReg3( ULONG port , USHORT data ) void XGINew_SetReg3( ULONG port , USHORT data )
{ {
OutPortByte( port , data ) ; outb(data, port);
} }
...@@ -68,7 +67,7 @@ void XGINew_SetReg3( ULONG port , USHORT data ) ...@@ -68,7 +67,7 @@ void XGINew_SetReg3( ULONG port , USHORT data )
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
void XGINew_SetReg4( ULONG port , ULONG data ) void XGINew_SetReg4( ULONG port , ULONG data )
{ {
OutPortLong( port , data ) ; outl(data, port);
} }
...@@ -82,9 +81,8 @@ UCHAR XGINew_GetReg1( ULONG port , USHORT index ) ...@@ -82,9 +81,8 @@ UCHAR XGINew_GetReg1( ULONG port , USHORT index )
{ {
UCHAR data ; UCHAR data ;
OutPortByte( port , index ) ; outb(index, port);
data = InPortByte( port + 1 ) ; data = inb(port + 1) ;
return( data ) ; return( data ) ;
} }
...@@ -99,7 +97,7 @@ UCHAR XGINew_GetReg2( ULONG port ) ...@@ -99,7 +97,7 @@ UCHAR XGINew_GetReg2( ULONG port )
{ {
UCHAR data ; UCHAR data ;
data = InPortByte( port ) ; data = inb(port) ;
return( data ) ; return( data ) ;
} }
...@@ -115,7 +113,7 @@ ULONG XGINew_GetReg3( ULONG port ) ...@@ -115,7 +113,7 @@ ULONG XGINew_GetReg3( ULONG port )
{ {
ULONG data ; ULONG data ;
data = InPortLong( port ) ; data = inl(port) ;
return( data ) ; return( data ) ;
} }
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
#ifndef _VGATYPES_ #ifndef _VGATYPES_
#define _VGATYPES_ #define _VGATYPES_
#include "osdef.h"
#include <linux/ioctl.h> #include <linux/ioctl.h>
#ifndef FALSE #ifndef FALSE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册