From 561a7af16b65929d3712e990b6c23f821e342675 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 11 Nov 2006 01:39:01 +0000 Subject: 2006-11-11 Samuel Thibault 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. --- i386/i386/pic.c | 10 +++++----- i386/i386at/kd_mouse.c | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'i386') 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 */ -- cgit v1.2.3