summaryrefslogtreecommitdiff
path: root/sys/arch/sgi/dev/mkbc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/sgi/dev/mkbc.c')
-rw-r--r--sys/arch/sgi/dev/mkbc.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/arch/sgi/dev/mkbc.c b/sys/arch/sgi/dev/mkbc.c
index 1c2e92f7649..a4878ef000d 100644
--- a/sys/arch/sgi/dev/mkbc.c
+++ b/sys/arch/sgi/dev/mkbc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mkbc.c,v 1.9 2009/10/26 18:00:06 miod Exp $ */
+/* $OpenBSD: mkbc.c,v 1.10 2010/12/03 18:29:56 shadchin Exp $ */
/*
* Copyright (c) 2006, 2007, Joel Sing
@@ -862,7 +862,7 @@ pckbc_set_poll(pckbc_tag_t self, pckbc_slot_t slot, int on)
}
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_addr_t addr, pckbc_slot_t slot)
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_addr_t addr, pckbc_slot_t slot)
/* 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);