Changeset 1ffa73b in mainline for uspace/lib/drv/generic/dev_iface.c


Ignore:
Timestamp:
2011-01-10T16:33:08Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b207803
Parents:
863d45e (diff), 6610565b (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 development/ changes

File:
1 edited

Legend:

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

    r863d45e r1ffa73b  
    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#include "remote_usb.h"
    4244#include "remote_usbhc.h"
     
    4446static iface_dipatch_table_t remote_ifaces = {
    4547        .ifaces = {
    46                 &remote_res_iface,
    47                 &remote_char_iface,
     48                &remote_hw_res_iface,
     49                &remote_char_dev_iface,
    4850                &remote_usb_iface,
    4951                &remote_usbhc_iface
     
    5153};
    5254
    53 remote_iface_t* get_remote_iface(int idx)
    54 {       
     55remote_iface_t *get_remote_iface(int idx)
     56{
    5557        assert(is_valid_iface_idx(idx));
    5658        return remote_ifaces.ifaces[idx];
     
    6365                return NULL;
    6466        }
     67
    6568        return rem_iface->methods[iface_method_idx];
     69}
     70
     71bool is_valid_iface_idx(int idx)
     72{
     73        return (0 <= idx) && (idx < DEV_IFACE_MAX);
    6674}
    6775
Note: See TracChangeset for help on using the changeset viewer.