Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/kbd/port/pl050.c

    r3bdf3d3 rb3d513f  
    4545#include <ddi.h>
    4646#include <stdio.h>
    47 #include <errno.h>
    4847
    49 #define PL050_STAT_RXFULL  (1 << 4)
    50 
     48#define PL050_STAT_RXFULL (1 << 4)
    5149static irq_cmd_t pl050_cmds[] = {
    5250        {
     
    6866        {
    6967                .cmd = CMD_PIO_READ_8,
    70                 .addr = NULL,  /* Will be patched in run-time */
     68                .addr = NULL,   /* will be patched in run-time */
    7169                .dstarg = 2
    7270        },
     
    8583int kbd_port_init(void)
    8684{
    87         sysarg_t addr;
    88         if (sysinfo_get_value("kbd.address.status", &addr) != EOK)
    89                 return -1;
    90        
    91         pl050_kbd.cmds[0].addr = (void *) addr;
    92        
    93         if (sysinfo_get_value("kbd.address.data", &addr) != EOK)
    94                 return -1;
    95        
    96         pl050_kbd.cmds[3].addr = (void *) addr;
    97        
    98         sysarg_t inr;
    99         if (sysinfo_get_value("kbd.inr", &inr) != EOK)
    100                 return -1;
    101        
     85
     86        pl050_kbd.cmds[0].addr = (void *) sysinfo_value("kbd.address.status");
     87        pl050_kbd.cmds[3].addr = (void *) sysinfo_value("kbd.address.data");
     88
    10289        async_set_interrupt_received(pl050_irq_handler);
    103         ipc_register_irq(inr, device_assign_devno(), 0, &pl050_kbd);
    104        
     90
     91        ipc_register_irq(sysinfo_value("kbd.inr"), device_assign_devno(), 0, &pl050_kbd);
     92
    10593        return 0;
    10694}
Note: See TracChangeset for help on using the changeset viewer.