summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2006-11-11 01:39:01 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:26:55 +0200
commit561a7af16b65929d3712e990b6c23f821e342675 (patch)
treea35e374b2fe9b869c71cad009e997bf8cd548045
parent355091d5357f0d8c5d5a2184505b965f2f94b614 (diff)
2006-11-11 Samuel Thibault <samuel.thibault@ens-lyon.org>
Fix I/O port type. * i386/i386/pic.c (master_icq, master_ocw, slaves_icq, slaves_ocw): Change variables type from char * to unsigned short. (picinit): Remove now-useless cast. * i386/i386at/kd_mouse.c (init_mouse_hw, serial_mouse_close) (mouseintr): Change variable type from caddr_t to unsigned short, remove now-useless cast.
-rw-r--r--ChangeLog8
-rw-r--r--i386/i386/pic.c10
-rw-r--r--i386/i386at/kd_mouse.c6
3 files changed, 16 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 4a0da30..732a40a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2006-11-11 Samuel Thibault <samuel.thibault@ens-lyon.org>
+ Fix I/O port type.
+ * i386/i386/pic.c (master_icq, master_ocw, slaves_icq, slaves_ocw):
+ Change variables type from char * to unsigned short.
+ (picinit): Remove now-useless cast.
+ * i386/i386at/kd_mouse.c (init_mouse_hw, serial_mouse_close)
+ (mouseintr): Change variable type from caddr_t to unsigned short,
+ remove now-useless cast.
+
[task #5726 --- ``GCC built-in functions'']
* kern/machine.c: Include `string.h'.
diff --git a/i386/i386/pic.c b/i386/i386/pic.c
index ee07b65..6d8cd79 100644
--- a/i386/i386/pic.c
+++ b/i386/i386/pic.c
@@ -65,7 +65,7 @@ int iunit[NINTR] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
int nintr = NINTR;
int npics = NPICS;
-char *master_icw, *master_ocw, *slaves_icw, *slaves_ocw;
+unsigned short master_icw, master_ocw, slaves_icw, slaves_ocw;
u_short PICM_ICW1, PICM_OCW1, PICS_ICW1, PICS_OCW1 ;
u_short PICM_ICW2, PICM_OCW2, PICS_ICW2, PICS_OCW2 ;
@@ -129,10 +129,10 @@ picinit()
** 2. Generate addresses to each PIC port.
*/
- master_icw = (char *)PIC_MASTER_ICW;
- master_ocw = (char *)PIC_MASTER_OCW;
- slaves_icw = (char *)PIC_SLAVE_ICW;
- slaves_ocw = (char *)PIC_SLAVE_OCW;
+ master_icw = PIC_MASTER_ICW;
+ master_ocw = PIC_MASTER_OCW;
+ slaves_icw = PIC_SLAVE_ICW;
+ slaves_ocw = PIC_SLAVE_OCW;
/*
** 3. Select options for each ICW and each OCW for each PIC.
diff --git a/i386/i386at/kd_mouse.c b/i386/i386at/kd_mouse.c
index 679b69e..b02e792 100644
--- a/i386/i386at/kd_mouse.c
+++ b/i386/i386at/kd_mouse.c
@@ -132,7 +132,7 @@ int mouse_char_index; /* mouse response */
*/
init_mouse_hw(unit, mode)
{
- caddr_t base_addr = (caddr_t)cominfo[unit]->address;
+ unsigned short base_addr = cominfo[unit]->address;
outb(base_addr + RIE, 0);
outb(base_addr + RLC, LCDLAB);
@@ -293,7 +293,7 @@ serial_mouse_close(dev, flags)
spl_t o_pri = splhi(); /* mutex with open() */
int unit = minor(dev) & 0x7;
int mouse_pic = cominfo[unit]->sysdep1;
- caddr_t base_addr = (caddr_t)cominfo[unit]->address;
+ unsigned short base_addr = cominfo[unit]->address;
assert(ivect[mouse_pic] == mouseintr);
outb(base_addr + RIE, 0); /* disable serial port */
@@ -516,7 +516,7 @@ done:
*/
mouseintr(unit)
{
- caddr_t base_addr = (caddr_t)cominfo[unit]->address;
+ unsigned short base_addr = cominfo[unit]->address;
unsigned char id, ls;
/* get reason for interrupt and line status */