Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset cccdb8b7 in mainline


Ignore:
Timestamp:
2012-02-12T22:43:34Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
Children:
9571230
Parents:
2507d1fc
Message:

In i8042 IRQ pseudocode, use the hardware address obtained from the parent.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/char/i8042/i8042.c

    r2507d1fc rcccdb8b7  
    237237        const size_t range_count = sizeof(i8042_ranges) /
    238238            sizeof(irq_pio_range_t);
    239         const size_t cmd_count = sizeof(i8042_cmds) / sizeof(irq_cmd_t);
    240239        irq_pio_range_t ranges[range_count];
    241         irq_cmd_t cmds[cmd_count];
    242240        memcpy(ranges, i8042_ranges, sizeof(i8042_ranges));
    243241        ranges[0].base = (uintptr_t) regs;
     242
     243        const size_t cmd_count = sizeof(i8042_cmds) / sizeof(irq_cmd_t);
     244        irq_cmd_t cmds[cmd_count];
    244245        memcpy(cmds, i8042_cmds, sizeof(i8042_cmds));
    245         cmds[0].addr = (void *) &dev->regs->status;
    246         cmds[3].addr = (void *) &dev->regs->data;
     246        cmds[0].addr = (void *) &(((i8042_regs_t *) regs)->status);
     247        cmds[3].addr = (void *) &(((i8042_regs_t *) regs)->data);
    247248
    248249        irq_code_t irq_code = {
Note: See TracChangeset for help on using the changeset viewer.