Changeset 80cd7cd in mainline for uspace/lib/drv/generic/dev_iface.c


Ignore:
Timestamp:
2011-01-13T20:58:24Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
87e373b
Parents:
eaef141 (diff), a613fea1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    reaef141 r80cd7cd  
    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];
     
    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.