summaryrefslogtreecommitdiff
path: root/hw/pckbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/pckbd.c')
-rw-r--r--hw/pckbd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/pckbd.c b/hw/pckbd.c
index 2176b83329..cceea4a5d1 100644
--- a/hw/pckbd.c
+++ b/hw/pckbd.c
@@ -125,7 +125,6 @@ typedef struct KBDState {
qemu_irq irq_kbd;
qemu_irq irq_mouse;
- target_phys_addr_t base;
int it_shift;
} KBDState;
@@ -392,7 +391,7 @@ static uint32_t kbd_mm_readb (void *opaque, target_phys_addr_t addr)
{
KBDState *s = opaque;
- switch ((addr - s->base) >> s->it_shift) {
+ switch (addr >> s->it_shift) {
case 0:
return kbd_read_data(s, 0) & 0xff;
case 1:
@@ -406,7 +405,7 @@ static void kbd_mm_writeb (void *opaque, target_phys_addr_t addr, uint32_t value
{
KBDState *s = opaque;
- switch ((addr - s->base) >> s->it_shift) {
+ switch (addr >> s->it_shift) {
case 0:
kbd_write_data(s, 0, value & 0xff);
break;
@@ -436,7 +435,6 @@ void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq,
s->irq_kbd = kbd_irq;
s->irq_mouse = mouse_irq;
- s->base = base;
s->it_shift = it_shift;
kbd_reset(s);