aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/sis/init.c20
-rw-r--r--drivers/video/sis/osdef.h30
2 files changed, 10 insertions, 40 deletions
diff --git a/drivers/video/sis/init.c b/drivers/video/sis/init.c
index 8351151e3f27..bfc6a1a8eaa2 100644
--- a/drivers/video/sis/init.c
+++ b/drivers/video/sis/init.c
@@ -882,51 +882,51 @@ SiS_GetModeID_VGA2(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDispl
882void 882void
883SiS_SetReg(SISIOADDRESS port, unsigned short index, unsigned short data) 883SiS_SetReg(SISIOADDRESS port, unsigned short index, unsigned short data)
884{ 884{
885 OutPortByte(port, index); 885 outb((u8)index, port);
886 OutPortByte(port + 1, data); 886 outb((u8)data, port + 1);
887} 887}
888 888
889void 889void
890SiS_SetRegByte(SISIOADDRESS port, unsigned short data) 890SiS_SetRegByte(SISIOADDRESS port, unsigned short data)
891{ 891{
892 OutPortByte(port, data); 892 outb((u8)data, port);
893} 893}
894 894
895void 895void
896SiS_SetRegShort(SISIOADDRESS port, unsigned short data) 896SiS_SetRegShort(SISIOADDRESS port, unsigned short data)
897{ 897{
898 OutPortWord(port, data); 898 outw((u16)data, port);
899} 899}
900 900
901void 901void
902SiS_SetRegLong(SISIOADDRESS port, unsigned int data) 902SiS_SetRegLong(SISIOADDRESS port, unsigned int data)
903{ 903{
904 OutPortLong(port, data); 904 outl((u32)data, port);
905} 905}
906 906
907unsigned char 907unsigned char
908SiS_GetReg(SISIOADDRESS port, unsigned short index) 908SiS_GetReg(SISIOADDRESS port, unsigned short index)
909{ 909{
910 OutPortByte(port, index); 910 outb((u8)index, port);
911 return(InPortByte(port + 1)); 911 return inb(port + 1);
912} 912}
913 913
914unsigned char 914unsigned char
915SiS_GetRegByte(SISIOADDRESS port) 915SiS_GetRegByte(SISIOADDRESS port)
916{ 916{
917 return(InPortByte(port)); 917 return inb(port);
918} 918}
919 919
920unsigned short 920unsigned short
921SiS_GetRegShort(SISIOADDRESS port) 921SiS_GetRegShort(SISIOADDRESS port)
922{ 922{
923 return(InPortWord(port)); 923 return inw(port);
924} 924}
925 925
926unsigned int 926unsigned int
927SiS_GetRegLong(SISIOADDRESS port) 927SiS_GetRegLong(SISIOADDRESS port)
928{ 928{
929 return(InPortLong(port)); 929 return inl(port);
930} 930}
931 931
932void 932void
diff --git a/drivers/video/sis/osdef.h b/drivers/video/sis/osdef.h
index dae407cdb51a..be7f306515a1 100644
--- a/drivers/video/sis/osdef.h
+++ b/drivers/video/sis/osdef.h
@@ -54,30 +54,6 @@
54#ifndef _SIS_OSDEF_H_ 54#ifndef _SIS_OSDEF_H_
55#define _SIS_OSDEF_H_ 55#define _SIS_OSDEF_H_
56 56
57#ifdef OutPortByte
58#undef OutPortByte
59#endif
60
61#ifdef OutPortWord
62#undef OutPortWord
63#endif
64
65#ifdef OutPortLong
66#undef OutPortLong
67#endif
68
69#ifdef InPortByte
70#undef InPortByte
71#endif
72
73#ifdef InPortWord
74#undef InPortWord
75#endif
76
77#ifdef InPortLong
78#undef InPortLong
79#endif
80
81/**********************************************************************/ 57/**********************************************************************/
82/* LINUX KERNEL */ 58/* LINUX KERNEL */
83/**********************************************************************/ 59/**********************************************************************/
@@ -87,12 +63,6 @@
87#warning sisfb will not work! 63#warning sisfb will not work!
88#endif 64#endif
89 65
90#define OutPortByte(p,v) outb((u8)(v),(SISIOADDRESS)(p))
91#define OutPortWord(p,v) outw((u16)(v),(SISIOADDRESS)(p))
92#define OutPortLong(p,v) outl((u32)(v),(SISIOADDRESS)(p))
93#define InPortByte(p) inb((SISIOADDRESS)(p))
94#define InPortWord(p) inw((SISIOADDRESS)(p))
95#define InPortLong(p) inl((SISIOADDRESS)(p))
96#define SiS_SetMemory(MemoryAddress,MemorySize,value) memset_io(MemoryAddress, value, MemorySize) 66#define SiS_SetMemory(MemoryAddress,MemorySize,value) memset_io(MemoryAddress, value, MemorySize)
97 67
98#endif /* _OSDEF_H_ */ 68#endif /* _OSDEF_H_ */