Changeset b7fd2a0 in mainline for uspace/drv/bus/adb
- Timestamp:
- 2018-01-13T03:10:29Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- Location:
- uspace/drv/bus/adb/cuda_adb
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/adb/cuda_adb/cuda_adb.c
r36f0738 rb7fd2a0 56 56 57 57 static void cuda_dev_connection(ipc_callid_t, ipc_call_t *, void *); 58 static int cuda_init(cuda_t *);58 static errno_t cuda_init(cuda_t *); 59 59 static void cuda_irq_handler(ipc_call_t *, void *); 60 60 … … 108 108 }; 109 109 110 static int cuda_dev_create(cuda_t *cuda, const char *name, const char *id,110 static errno_t cuda_dev_create(cuda_t *cuda, const char *name, const char *id, 111 111 adb_dev_t **rdev) 112 112 { 113 113 adb_dev_t *dev = NULL; 114 114 ddf_fun_t *fun; 115 int rc;115 errno_t rc; 116 116 117 117 fun = ddf_fun_create(cuda->dev, fun_inner, name); … … 155 155 } 156 156 157 int cuda_add(cuda_t *cuda, cuda_res_t *res)157 errno_t cuda_add(cuda_t *cuda, cuda_res_t *res) 158 158 { 159 159 adb_dev_t *kbd = NULL; 160 160 adb_dev_t *mouse = NULL; 161 int rc;161 errno_t rc; 162 162 163 163 cuda->phys_base = res->base; … … 187 187 } 188 188 189 int cuda_remove(cuda_t *cuda)189 errno_t cuda_remove(cuda_t *cuda) 190 190 { 191 191 return ENOTSUP; 192 192 } 193 193 194 int cuda_gone(cuda_t *cuda)194 errno_t cuda_gone(cuda_t *cuda) 195 195 { 196 196 return ENOTSUP; … … 229 229 } 230 230 231 static int cuda_init(cuda_t *cuda)232 { 233 int rc;231 static errno_t cuda_init(cuda_t *cuda) 232 { 233 errno_t rc; 234 234 235 235 void *vaddr; -
uspace/drv/bus/adb/cuda_adb/cuda_adb.h
r36f0738 rb7fd2a0 87 87 } cuda_t; 88 88 89 extern int cuda_add(cuda_t *, cuda_res_t *);90 extern int cuda_remove(cuda_t *);91 extern int cuda_gone(cuda_t *);89 extern errno_t cuda_add(cuda_t *, cuda_res_t *); 90 extern errno_t cuda_remove(cuda_t *); 91 extern errno_t cuda_gone(cuda_t *); 92 92 93 93 #endif -
uspace/drv/bus/adb/cuda_adb/main.c
r36f0738 rb7fd2a0 43 43 #define NAME "cuda_adb" 44 44 45 static int cuda_dev_add(ddf_dev_t *dev);46 static int cuda_dev_remove(ddf_dev_t *dev);47 static int cuda_dev_gone(ddf_dev_t *dev);48 static int cuda_fun_online(ddf_fun_t *fun);49 static int cuda_fun_offline(ddf_fun_t *fun);45 static errno_t cuda_dev_add(ddf_dev_t *dev); 46 static errno_t cuda_dev_remove(ddf_dev_t *dev); 47 static errno_t cuda_dev_gone(ddf_dev_t *dev); 48 static errno_t cuda_fun_online(ddf_fun_t *fun); 49 static errno_t cuda_fun_offline(ddf_fun_t *fun); 50 50 51 51 static driver_ops_t driver_ops = { … … 62 62 }; 63 63 64 static int cuda_get_res(ddf_dev_t *dev, cuda_res_t *res)64 static errno_t cuda_get_res(ddf_dev_t *dev, cuda_res_t *res) 65 65 { 66 66 async_sess_t *parent_sess; 67 67 hw_res_list_parsed_t hw_res; 68 int rc;68 errno_t rc; 69 69 70 70 parent_sess = ddf_dev_parent_sess_get(dev); … … 97 97 } 98 98 99 static int cuda_dev_add(ddf_dev_t *dev)99 static errno_t cuda_dev_add(ddf_dev_t *dev) 100 100 { 101 101 cuda_t *cuda; 102 102 cuda_res_t cuda_res; 103 int rc;103 errno_t rc; 104 104 105 105 ddf_msg(LVL_DEBUG, "cuda_dev_add(%p)", dev); … … 122 122 } 123 123 124 static int cuda_dev_remove(ddf_dev_t *dev)124 static errno_t cuda_dev_remove(ddf_dev_t *dev) 125 125 { 126 126 cuda_t *cuda = (cuda_t *)ddf_dev_data_get(dev); … … 131 131 } 132 132 133 static int cuda_dev_gone(ddf_dev_t *dev)133 static errno_t cuda_dev_gone(ddf_dev_t *dev) 134 134 { 135 135 cuda_t *cuda = (cuda_t *)ddf_dev_data_get(dev); … … 140 140 } 141 141 142 static int cuda_fun_online(ddf_fun_t *fun)142 static errno_t cuda_fun_online(ddf_fun_t *fun) 143 143 { 144 144 ddf_msg(LVL_DEBUG, "cuda_fun_online()"); … … 146 146 } 147 147 148 static int cuda_fun_offline(ddf_fun_t *fun)148 static errno_t cuda_fun_offline(ddf_fun_t *fun) 149 149 { 150 150 ddf_msg(LVL_DEBUG, "cuda_fun_offline()");
Note:
See TracChangeset
for help on using the changeset viewer.