Changes in uspace/lib/drv/generic/dev_iface.c [22027b6e:7a252ec8] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/dev_iface.c
r22027b6e r7a252ec8 36 36 */ 37 37 38 #include <assert.h>39 40 38 #include "dev_iface.h" 41 #include "remote_ hw_res.h"42 #include "remote_char _dev.h"39 #include "remote_res.h" 40 #include "remote_char.h" 43 41 44 42 static iface_dipatch_table_t remote_ifaces = { 45 43 .ifaces = { 46 &remote_ hw_res_iface,47 &remote_char_ dev_iface44 &remote_res_iface, 45 &remote_char_iface 48 46 } 49 47 }; 50 48 51 remote_iface_t *get_remote_iface(int idx)52 { 49 remote_iface_t* get_remote_iface(int idx) 50 { 53 51 assert(is_valid_iface_idx(idx)); 54 52 return remote_ifaces.ifaces[idx]; … … 56 54 57 55 remote_iface_func_ptr_t 58 get_remote_method(remote_iface_t *rem_iface, sysarg_t iface_method_idx)56 get_remote_method(remote_iface_t *rem_iface, ipcarg_t iface_method_idx) 59 57 { 60 58 if (iface_method_idx >= rem_iface->method_count) { 61 59 return NULL; 62 60 } 63 64 61 return rem_iface->methods[iface_method_idx]; 65 }66 67 bool is_valid_iface_idx(int idx)68 {69 return (0 <= idx) && (idx < DEV_IFACE_MAX);70 62 } 71 63
Note:
See TracChangeset
for help on using the changeset viewer.