Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/dev_iface.c

    r7a252ec8 r22027b6e  
    3636 */
    3737
     38#include <assert.h>
     39
    3840#include "dev_iface.h"
    39 #include "remote_res.h"
    40 #include "remote_char.h"
     41#include "remote_hw_res.h"
     42#include "remote_char_dev.h"
    4143
    4244static iface_dipatch_table_t remote_ifaces = {
    4345        .ifaces = {
    44                 &remote_res_iface,
    45                 &remote_char_iface
     46                &remote_hw_res_iface,
     47                &remote_char_dev_iface
    4648        }
    4749};
    4850
    49 remote_iface_t* get_remote_iface(int idx)
    50 {       
     51remote_iface_t *get_remote_iface(int idx)
     52{
    5153        assert(is_valid_iface_idx(idx));
    5254        return remote_ifaces.ifaces[idx];
     
    5456
    5557remote_iface_func_ptr_t
    56 get_remote_method(remote_iface_t *rem_iface, ipcarg_t iface_method_idx)
     58get_remote_method(remote_iface_t *rem_iface, sysarg_t iface_method_idx)
    5759{
    5860        if (iface_method_idx >= rem_iface->method_count) {
    5961                return NULL;
    6062        }
     63
    6164        return rem_iface->methods[iface_method_idx];
     65}
     66
     67bool is_valid_iface_idx(int idx)
     68{
     69        return (0 <= idx) && (idx < DEV_IFACE_MAX);
    6270}
    6371
Note: See TracChangeset for help on using the changeset viewer.