[PATCH 146/524] Staging: xgifb: Remove port macros in osdef.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Bill Pemberton <wfp5p@xxxxxxxxxxxx>

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: Bill Pemberton <wfp5p@xxxxxxxxxxxx>
Cc: Arnaud Patard <apatard@xxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
 drivers/staging/xgifb/XGI_accel.c   |    1 -
 drivers/staging/xgifb/XGI_main_26.c |    2 -
 drivers/staging/xgifb/osdef.h       |   37 -----------------------------------
 drivers/staging/xgifb/vb_ext.c      |    2 -
 drivers/staging/xgifb/vb_init.c     |    1 -
 drivers/staging/xgifb/vb_setmode.c  |    4 ---
 drivers/staging/xgifb/vb_util.c     |   18 +++++++---------
 drivers/staging/xgifb/vgatypes.h    |    2 -
 8 files changed, 8 insertions(+), 59 deletions(-)
 delete mode 100644 drivers/staging/xgifb/osdef.h

diff --git a/drivers/staging/xgifb/XGI_accel.c b/drivers/staging/xgifb/XGI_accel.c
index 24f454d..85af55c 100644
--- a/drivers/staging/xgifb/XGI_accel.c
+++ b/drivers/staging/xgifb/XGI_accel.c
@@ -43,7 +43,6 @@
 #include <asm/mtrr.h>
 #endif
 
-#include "osdef.h"
 #include "vgatypes.h"
 #include "vb_struct.h"
 #include "XGIfb.h"
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index e9551d3..c7ad6cd 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -29,8 +29,6 @@
 #include <linux/types.h>
 #include <linux/proc_fs.h>
 
-#include "osdef.h"
-
 
 #ifndef XGIFB_PAN
 #define XGIFB_PAN
diff --git a/drivers/staging/xgifb/osdef.h b/drivers/staging/xgifb/osdef.h
deleted file mode 100644
index 7d05ea4..0000000
--- a/drivers/staging/xgifb/osdef.h
+++ /dev/null
@@ -1,37 +0,0 @@
-#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_
diff --git a/drivers/staging/xgifb/vb_ext.c b/drivers/staging/xgifb/vb_ext.c
index f4969c2..4358d96 100644
--- a/drivers/staging/xgifb/vb_ext.c
+++ b/drivers/staging/xgifb/vb_ext.c
@@ -1,5 +1,3 @@
-#include "osdef.h"
-
 #include <linux/version.h>
 #include <asm/io.h>
 #include <linux/types.h>
diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c
index dc12184..c5c7284 100644
--- a/drivers/staging/xgifb/vb_init.c
+++ b/drivers/staging/xgifb/vb_init.c
@@ -1,4 +1,3 @@
-#include "osdef.h"
 #include "vgatypes.h"
 
 #include <linux/version.h>
diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
index 95efa8b..dc4e186 100644
--- a/drivers/staging/xgifb/vb_setmode.c
+++ b/drivers/staging/xgifb/vb_setmode.c
@@ -1,7 +1,3 @@
-#include "osdef.h"
-
-
-
 
 #include <asm/io.h>
 #include <linux/types.h>
diff --git a/drivers/staging/xgifb/vb_util.c b/drivers/staging/xgifb/vb_util.c
index 753b1c5..f83aee7 100644
--- a/drivers/staging/xgifb/vb_util.c
+++ b/drivers/staging/xgifb/vb_util.c
@@ -1,4 +1,3 @@
-#include "osdef.h"
 #include "vb_def.h"
 #include "vgatypes.h"
 #include "vb_struct.h"
@@ -28,8 +27,8 @@ void     XGINew_SetRegAND(ULONG Port,USHORT Index,USHORT DataAND);
 /* --------------------------------------------------------------------- */
 void XGINew_SetReg1( ULONG port , USHORT index , USHORT data )
 {
-    OutPortByte( port , index ) ;
-    OutPortByte( port + 1 , data ) ;
+	outb(index, port);
+	outb(data, port + 1);
 }
 
 
@@ -56,7 +55,7 @@ void XGINew_SetReg1( ULONG port , USHORT index , 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 )
 /* --------------------------------------------------------------------- */
 void XGINew_SetReg4( ULONG port , ULONG data )
 {
-    OutPortLong( port , data ) ;
+	outl(data, port);
 }
 
 
@@ -82,9 +81,8 @@ UCHAR XGINew_GetReg1( ULONG port , USHORT index )
 {
     UCHAR data ;
 
-    OutPortByte( port , index ) ;
-    data = InPortByte( port + 1 ) ;
-
+    outb(index, port);
+    data = inb(port + 1) ;
     return( data ) ;
 }
 
@@ -99,7 +97,7 @@ UCHAR XGINew_GetReg2( ULONG port )
 {
     UCHAR data ;
 
-    data = InPortByte( port ) ;
+    data = inb(port) ;
 
     return( data ) ;
 }
@@ -115,7 +113,7 @@ ULONG XGINew_GetReg3( ULONG port )
 {
     ULONG data ;
 
-    data = InPortLong( port ) ;
+    data = inl(port) ;
 
     return( data ) ;
 }
diff --git a/drivers/staging/xgifb/vgatypes.h b/drivers/staging/xgifb/vgatypes.h
index 745c993..83fea8e 100644
--- a/drivers/staging/xgifb/vgatypes.h
+++ b/drivers/staging/xgifb/vgatypes.h
@@ -2,8 +2,6 @@
 #ifndef _VGATYPES_
 #define _VGATYPES_
 
-#include "osdef.h"
-
 #include <linux/ioctl.h>
 
 #ifndef FALSE
-- 
1.7.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux