removed slot argument of function pckbd_cnattach
because it is always PCKBC_KBD_SLOT
(not to be confused with pckbc_cnattach) 

-- 
Alexandr Shadchin

Index: arch/hppa/gsc/gsckbc.c
===================================================================
RCS file: /cvs/src/sys/arch/hppa/gsc/gsckbc.c,v
retrieving revision 1.12
diff -u -p -r1.12 gsckbc.c
--- arch/hppa/gsc/gsckbc.c      15 Oct 2008 19:12:19 -0000      1.12
+++ arch/hppa/gsc/gsckbc.c      23 Nov 2010 12:03:51 -0000
@@ -415,7 +415,7 @@ gsckbc_attach(struct device *parent, str
                if (gsc->sc_type == PCKBC_KBD_SLOT &&
                    ga->ga_dp.dp_mod == PAGE0->mem_kbd.pz_dp.dp_mod &&
                    bcmp(ga->ga_dp.dp_bc, PAGE0->mem_kbd.pz_dp.dp_bc, 6) == 0)
-                       pckbd_cnattach(t, PCKBC_KBD_SLOT);
+                       pckbd_cnattach(t);
 #endif
                pckbc_attach_slot(sc, gsc->sc_type);
        }
Index: arch/sgi/dev/iockbc.c
===================================================================
RCS file: /cvs/src/sys/arch/sgi/dev/iockbc.c,v
retrieving revision 1.6
diff -u -p -r1.6 iockbc.c
--- arch/sgi/dev/iockbc.c       6 Apr 2010 19:12:26 -0000       1.6
+++ arch/sgi/dev/iockbc.c       23 Nov 2010 12:03:52 -0000
@@ -973,7 +973,7 @@ static struct pckbc_slotdata iockbc_cons
 static int iockbc_console;
 
 int
-iockbc_cnattach(pckbc_slot_t slot)
+iockbc_cnattach()
 {
        bus_space_tag_t iot = &sys_config.console_io;
        bus_space_handle_t ioh = (bus_space_handle_t)iot->bus_base;
@@ -988,13 +988,13 @@ iockbc_cnattach(pckbc_slot_t slot)
        if (is_ioc) {
 #if NIOCKBC_IOC > 0
                if (sys_config.system_type == SGI_IP35)
-                       reginfo = &iockbc_ioc_inverted[slot];
+                       reginfo = &iockbc_ioc_inverted[PCKBC_KBD_SLOT];
                else
-                       reginfo = &iockbc_ioc_normal[slot];
+                       reginfo = &iockbc_ioc_normal[PCKBC_KBD_SLOT];
 #endif
        } else {
 #if NIOCKBC_IOF > 0
-               reginfo = &iockbc_iof[slot];
+               reginfo = &iockbc_iof[PCKBC_KBD_SLOT];
 #endif
        }
        if (reginfo == NULL)
@@ -1022,9 +1022,9 @@ iockbc_cnattach(pckbc_slot_t slot)
        timeout_set(&t->t_poll, iockbc_poll, t);
 
        iockbc_init_slotdata(&iockbc_cons_slotdata, reginfo);
-       t->t_slotdata[slot] = &iockbc_cons_slotdata;
+       t->t_slotdata[PCKBC_KBD_SLOT] = &iockbc_cons_slotdata;
 
-       rc = pckbd_cnattach(t, slot);
+       rc = pckbd_cnattach(t);
        if (rc == 0)
                iockbc_console = 1;
 
Index: arch/sgi/dev/iockbcvar.h
===================================================================
RCS file: /cvs/src/sys/arch/sgi/dev/iockbcvar.h,v
retrieving revision 1.2
diff -u -p -r1.2 iockbcvar.h
--- arch/sgi/dev/iockbcvar.h    6 Apr 2010 19:12:26 -0000       1.2
+++ arch/sgi/dev/iockbcvar.h    23 Nov 2010 12:03:52 -0000
@@ -16,4 +16,4 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-int    iockbc_cnattach(pckbc_slot_t);
+int    iockbc_cnattach();
Index: arch/sgi/dev/mkbc.c
===================================================================
RCS file: /cvs/src/sys/arch/sgi/dev/mkbc.c,v
retrieving revision 1.9
diff -u -p -r1.9 mkbc.c
--- arch/sgi/dev/mkbc.c 26 Oct 2009 18:00:06 -0000      1.9
+++ arch/sgi/dev/mkbc.c 23 Nov 2010 12:03:52 -0000
@@ -862,7 +862,7 @@ pckbc_set_poll(pckbc_tag_t self, pckbc_s
 }
 
 int
-mkbc_cnattach(bus_space_tag_t iot, bus_addr_t addr, pckbc_slot_t slot)
+mkbc_cnattach(bus_space_tag_t iot, bus_addr_t addr)
 {
        bus_space_handle_t ioh, slot_ioh;
        int res = 0;
@@ -879,15 +879,14 @@ mkbc_cnattach(bus_space_tag_t iot, bus_a
        mkbc_consdata.t_ioh_d = ioh;
 
        /* Map subregion of bus space for this "slot". */
-       if (bus_space_subregion(iot, ioh, MKBC_PORTSIZE * slot, MKBC_PORTSIZE,
-           &slot_ioh)) {
+       if (bus_space_subregion(iot, ioh, 0, MKBC_PORTSIZE, &slot_ioh)) {
                bus_space_unmap(iot, ioh, MKBC_PORTSIZE * 2);
                return (ENXIO);
        }
 
        mkbc_cons_slotdata.ioh = slot_ioh;
        mkbc_init_slotdata(&mkbc_cons_slotdata);
-       mkbc_consdata.t_slotdata[slot] = &mkbc_cons_slotdata;
+       mkbc_consdata.t_slotdata[PCKBC_KBD_SLOT] = &mkbc_cons_slotdata;
 
        /* Initialise controller. */
        bus_space_write_8(iot, slot_ioh, MKBC_CONTROL,
@@ -905,7 +904,7 @@ mkbc_cnattach(bus_space_tag_t iot, bus_a
        /* Flush input buffer. */
        (void) mkbc_poll_read(iot, slot_ioh);
 
-       res = pckbd_cnattach(&mkbc_consdata, slot);
+       res = pckbd_cnattach(&mkbc_consdata);
 
        if (res) {
                bus_space_unmap(iot, ioh, MKBC_PORTSIZE * 2);
Index: arch/sgi/dev/mkbcreg.h
===================================================================
RCS file: /cvs/src/sys/arch/sgi/dev/mkbcreg.h,v
retrieving revision 1.2
diff -u -p -r1.2 mkbcreg.h
--- arch/sgi/dev/mkbcreg.h      14 Dec 2007 16:09:23 -0000      1.2
+++ arch/sgi/dev/mkbcreg.h      23 Nov 2010 12:03:52 -0000
@@ -51,4 +51,4 @@
 #define MKBC_CONTROL_RX_CLOCK_ENABLE   0x10
 #define MKBC_CONTROL_RESET             0x20
 
-int    mkbc_cnattach(bus_space_tag_t, bus_addr_t, pckbc_slot_t);
+int    mkbc_cnattach(bus_space_tag_t, bus_addr_t);
Index: arch/sgi/sgi/wscons_machdep.c
===================================================================
RCS file: /cvs/src/sys/arch/sgi/sgi/wscons_machdep.c,v
retrieving revision 1.8
diff -u -p -r1.8 wscons_machdep.c
--- arch/sgi/sgi/wscons_machdep.c       6 Apr 2010 19:12:34 -0000       1.8
+++ arch/sgi/sgi/wscons_machdep.c       23 Nov 2010 12:03:52 -0000
@@ -180,8 +180,7 @@ static int initted;
 #endif
 
 #if NMKBC > 0
-               if (mkbc_cnattach(&macebus_tag, MACE_IO_KBC_OFFS,
-                   PCKBC_KBD_SLOT) == 0)
+               if (mkbc_cnattach(&macebus_tag, MACE_IO_KBC_OFFS) == 0)
                        return; /* console keyboard found */
 #endif
 #if NUKBD > 0
@@ -317,7 +316,7 @@ widget_cnattach()
                return;
 
 #if NIOCKBC > 0
-       if (iockbc_cnattach(PCKBC_KBD_SLOT) == 0)
+       if (iockbc_cnattach() == 0)
                return; /* console keyboard found */
 #endif
 #if NUKBD > 0
Index: dev/ic/pckbc.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/pckbc.c,v
retrieving revision 1.27
diff -u -p -r1.27 pckbc.c
--- dev/ic/pckbc.c      23 Nov 2010 04:07:55 -0000      1.27
+++ dev/ic/pckbc.c      23 Nov 2010 12:03:53 -0000
@@ -1048,7 +1048,7 @@ pckbc_cnattach(bus_space_tag_t iot, bus_
 
        if (!res) {
 #if (NPCKBD > 0)
-               res = pckbd_cnattach(&pckbc_consdata, PCKBC_KBD_SLOT);
+               res = pckbd_cnattach(&pckbc_consdata);
 #else
                res = ENXIO;
 #endif /* NPCKBD > 0 */
Index: dev/pckbc/pckbd.c
===================================================================
RCS file: /cvs/src/sys/dev/pckbc/pckbd.c,v
retrieving revision 1.28
diff -u -p -r1.28 pckbd.c
--- dev/pckbc/pckbd.c   28 Aug 2010 12:49:57 -0000      1.28
+++ dev/pckbc/pckbd.c   23 Nov 2010 12:03:53 -0000
@@ -1030,14 +1030,13 @@ pckbd_hookup_bell(fn, arg)
 }
 
 int
-pckbd_cnattach(kbctag, kbcslot)
+pckbd_cnattach(kbctag)
        pckbc_tag_t kbctag;
-       int kbcslot;
 {
        char cmd[1];
        int res;
 
-       res = pckbd_init(&pckbd_consdata, kbctag, kbcslot, 1);
+       res = pckbd_init(&pckbd_consdata, kbctag, PCKBC_KBD_SLOT, 1);
 #if 0 /* we allow the console to be attached if no keyboard is present */
        if (res)
                return (res);
@@ -1045,7 +1044,7 @@ pckbd_cnattach(kbctag, kbcslot)
 
        /* Just to be sure. */
        cmd[0] = KBC_ENABLE;
-       res = pckbc_poll_cmd(kbctag, kbcslot, cmd, 1, 0, NULL, 0);
+       res = pckbc_poll_cmd(kbctag, PCKBC_KBD_SLOT, cmd, 1, 0, NULL, 0);
 #if 0
        if (res)
                return (res);
Index: dev/pckbc/pckbdvar.h
===================================================================
RCS file: /cvs/src/sys/dev/pckbc/pckbdvar.h,v
retrieving revision 1.3
diff -u -p -r1.3 pckbdvar.h
--- dev/pckbc/pckbdvar.h        14 Mar 2002 03:16:07 -0000      1.3
+++ dev/pckbc/pckbdvar.h        23 Nov 2010 12:03:53 -0000
@@ -1,6 +1,6 @@
 /* $OpenBSD: pckbdvar.h,v 1.3 2002/03/14 03:16:07 millert Exp $ */
 /* $NetBSD: pckbdvar.h,v 1.3 2000/03/10 06:10:35 thorpej Exp $ */
 
-int    pckbd_cnattach(pckbc_tag_t, int);
+int    pckbd_cnattach(pckbc_tag_t);
 void   pckbd_hookup_bell(void (*fn)(void *, u_int, u_int, u_int, int),
            void *);

Reply via email to