diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2010-12-20 16:50:13 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-12-21 22:56:46 -0500 |
commit | f48b9644ef330a13c6bb16ca85c2efdbe7e25558 (patch) | |
tree | 5290969092a6040b692910a9d95612b55fc5fa00 | |
parent | e68046b72e9b35d054e3d98d71dc2c69d7e88e1e (diff) |
sisfb: change register I/O functions to use fixed size types
Use fixed-sized types (u8, u16, u32) instead of plain C types.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | drivers/video/sis/init.c | 42 | ||||
-rw-r--r-- | drivers/video/sis/sis.h | 22 |
2 files changed, 32 insertions, 32 deletions
diff --git a/drivers/video/sis/init.c b/drivers/video/sis/init.c index 5f49db145bbd..66de832361cc 100644 --- a/drivers/video/sis/init.c +++ b/drivers/video/sis/init.c | |||
@@ -876,59 +876,59 @@ SiS_GetModeID_VGA2(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDispl | |||
876 | /*********************************************/ | 876 | /*********************************************/ |
877 | 877 | ||
878 | void | 878 | void |
879 | SiS_SetReg(SISIOADDRESS port, unsigned short index, unsigned short data) | 879 | SiS_SetReg(SISIOADDRESS port, u8 index, u8 data) |
880 | { | 880 | { |
881 | outb((u8)index, port); | 881 | outb(index, port); |
882 | outb((u8)data, port + 1); | 882 | outb(data, port + 1); |
883 | } | 883 | } |
884 | 884 | ||
885 | void | 885 | void |
886 | SiS_SetRegByte(SISIOADDRESS port, unsigned short data) | 886 | SiS_SetRegByte(SISIOADDRESS port, u8 data) |
887 | { | 887 | { |
888 | outb((u8)data, port); | 888 | outb(data, port); |
889 | } | 889 | } |
890 | 890 | ||
891 | void | 891 | void |
892 | SiS_SetRegShort(SISIOADDRESS port, unsigned short data) | 892 | SiS_SetRegShort(SISIOADDRESS port, u16 data) |
893 | { | 893 | { |
894 | outw((u16)data, port); | 894 | outw(data, port); |
895 | } | 895 | } |
896 | 896 | ||
897 | void | 897 | void |
898 | SiS_SetRegLong(SISIOADDRESS port, unsigned int data) | 898 | SiS_SetRegLong(SISIOADDRESS port, u32 data) |
899 | { | 899 | { |
900 | outl((u32)data, port); | 900 | outl(data, port); |
901 | } | 901 | } |
902 | 902 | ||
903 | unsigned char | 903 | u8 |
904 | SiS_GetReg(SISIOADDRESS port, unsigned short index) | 904 | SiS_GetReg(SISIOADDRESS port, u8 index) |
905 | { | 905 | { |
906 | outb((u8)index, port); | 906 | outb(index, port); |
907 | return inb(port + 1); | 907 | return inb(port + 1); |
908 | } | 908 | } |
909 | 909 | ||
910 | unsigned char | 910 | u8 |
911 | SiS_GetRegByte(SISIOADDRESS port) | 911 | SiS_GetRegByte(SISIOADDRESS port) |
912 | { | 912 | { |
913 | return inb(port); | 913 | return inb(port); |
914 | } | 914 | } |
915 | 915 | ||
916 | unsigned short | 916 | u16 |
917 | SiS_GetRegShort(SISIOADDRESS port) | 917 | SiS_GetRegShort(SISIOADDRESS port) |
918 | { | 918 | { |
919 | return inw(port); | 919 | return inw(port); |
920 | } | 920 | } |
921 | 921 | ||
922 | unsigned int | 922 | u32 |
923 | SiS_GetRegLong(SISIOADDRESS port) | 923 | SiS_GetRegLong(SISIOADDRESS port) |
924 | { | 924 | { |
925 | return inl(port); | 925 | return inl(port); |
926 | } | 926 | } |
927 | 927 | ||
928 | void | 928 | void |
929 | SiS_SetRegANDOR(SISIOADDRESS Port, unsigned short Index, unsigned short DataAND, unsigned short DataOR) | 929 | SiS_SetRegANDOR(SISIOADDRESS Port, u8 Index, u8 DataAND, u8 DataOR) |
930 | { | 930 | { |
931 | unsigned short temp; | 931 | u8 temp; |
932 | 932 | ||
933 | temp = SiS_GetReg(Port, Index); | 933 | temp = SiS_GetReg(Port, Index); |
934 | temp = (temp & (DataAND)) | DataOR; | 934 | temp = (temp & (DataAND)) | DataOR; |
@@ -936,9 +936,9 @@ SiS_SetRegANDOR(SISIOADDRESS Port, unsigned short Index, unsigned short DataAND, | |||
936 | } | 936 | } |
937 | 937 | ||
938 | void | 938 | void |
939 | SiS_SetRegAND(SISIOADDRESS Port, unsigned short Index, unsigned short DataAND) | 939 | SiS_SetRegAND(SISIOADDRESS Port, u8 Index, u8 DataAND) |
940 | { | 940 | { |
941 | unsigned short temp; | 941 | u8 temp; |
942 | 942 | ||
943 | temp = SiS_GetReg(Port, Index); | 943 | temp = SiS_GetReg(Port, Index); |
944 | temp &= DataAND; | 944 | temp &= DataAND; |
@@ -946,9 +946,9 @@ SiS_SetRegAND(SISIOADDRESS Port, unsigned short Index, unsigned short DataAND) | |||
946 | } | 946 | } |
947 | 947 | ||
948 | void | 948 | void |
949 | SiS_SetRegOR(SISIOADDRESS Port, unsigned short Index, unsigned short DataOR) | 949 | SiS_SetRegOR(SISIOADDRESS Port, u8 Index, u8 DataOR) |
950 | { | 950 | { |
951 | unsigned short temp; | 951 | u8 temp; |
952 | 952 | ||
953 | temp = SiS_GetReg(Port, Index); | 953 | temp = SiS_GetReg(Port, Index); |
954 | temp |= DataOR; | 954 | temp |= DataOR; |
diff --git a/drivers/video/sis/sis.h b/drivers/video/sis/sis.h index a94272d0126e..acf0766c4dbf 100644 --- a/drivers/video/sis/sis.h +++ b/drivers/video/sis/sis.h | |||
@@ -309,17 +309,17 @@ | |||
309 | 309 | ||
310 | /* I/O port access macros and functions */ | 310 | /* I/O port access macros and functions */ |
311 | 311 | ||
312 | void SiS_SetReg(SISIOADDRESS, unsigned short, unsigned short); | 312 | void SiS_SetReg(SISIOADDRESS, u8, u8); |
313 | void SiS_SetRegByte(SISIOADDRESS, unsigned short); | 313 | void SiS_SetRegByte(SISIOADDRESS, u8); |
314 | void SiS_SetRegShort(SISIOADDRESS, unsigned short); | 314 | void SiS_SetRegShort(SISIOADDRESS, u16); |
315 | void SiS_SetRegLong(SISIOADDRESS, unsigned int); | 315 | void SiS_SetRegLong(SISIOADDRESS, u32); |
316 | void SiS_SetRegANDOR(SISIOADDRESS, unsigned short, unsigned short, unsigned short); | 316 | void SiS_SetRegANDOR(SISIOADDRESS, u8, u8, u8); |
317 | void SiS_SetRegAND(SISIOADDRESS, unsigned short, unsigned short); | 317 | void SiS_SetRegAND(SISIOADDRESS, u8, u8); |
318 | void SiS_SetRegOR(SISIOADDRESS, unsigned short, unsigned short); | 318 | void SiS_SetRegOR(SISIOADDRESS, u8, u8); |
319 | unsigned char SiS_GetReg(SISIOADDRESS, unsigned short); | 319 | u8 SiS_GetReg(SISIOADDRESS, u8); |
320 | unsigned char SiS_GetRegByte(SISIOADDRESS); | 320 | u8 SiS_GetRegByte(SISIOADDRESS); |
321 | unsigned short SiS_GetRegShort(SISIOADDRESS); | 321 | u16 SiS_GetRegShort(SISIOADDRESS); |
322 | unsigned int SiS_GetRegLong(SISIOADDRESS); | 322 | u32 SiS_GetRegLong(SISIOADDRESS); |
323 | 323 | ||
324 | #define inSISREG(base) inb(base) | 324 | #define inSISREG(base) inb(base) |
325 | 325 | ||