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