Changeset 4f87a85a in mainline for uspace/drv/char
- Timestamp:
- 2018-12-10T14:29:35Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ca4c5596
- Parents:
- 433d52f
- git-author:
- Jiri Svoboda <jiri@…> (2018-12-10 07:39:07)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-12-10 14:29:35)
- Location:
- uspace/drv/char
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/char/msim-con/msim-con.c
r433d52f r4f87a85a 85 85 irq_cmd_t *msim_cmds = NULL; 86 86 errno_t rc; 87 bool bound = false; 87 88 88 89 circ_buf_init(&con->cbuf, con->buf, msim_con_buf_size, 1); … … 143 144 } 144 145 145 ddf_fun_add_to_category(fun, "console"); 146 bound = true; 147 148 rc = ddf_fun_add_to_category(fun, "console"); 149 if (rc != EOK) { 150 ddf_msg(LVL_ERROR, "Error adding function 'a' to category " 151 "'console'."); 152 goto error; 153 } 146 154 147 155 return EOK; … … 149 157 if (CAP_HANDLE_VALID(con->irq_handle)) 150 158 async_irq_unsubscribe(con->irq_handle); 159 if (bound) 160 ddf_fun_unbind(fun); 151 161 if (fun != NULL) 152 162 ddf_fun_destroy(fun); -
uspace/drv/char/ns8250/ns8250.c
r433d52f r4f87a85a 829 829 bool need_cleanup = false; 830 830 bool need_unreg_intr_handler = false; 831 bool bound = false; 831 832 errno_t rc; 832 833 … … 909 910 } 910 911 912 bound = true; 911 913 ns->fun = fun; 912 914 913 ddf_fun_add_to_category(fun, "serial"); 915 rc = ddf_fun_add_to_category(fun, "serial"); 916 if (rc != EOK) { 917 ddf_msg(LVL_ERROR, "Error adding function to category 'serial'."); 918 goto fail; 919 } 914 920 915 921 ddf_msg(LVL_NOTE, "Device %s successfully initialized.", … … 918 924 return EOK; 919 925 fail: 926 if (bound) 927 ddf_fun_unbind(fun); 920 928 if (fun != NULL) 921 929 ddf_fun_destroy(fun); -
uspace/drv/char/ski-con/ski-con.c
r433d52f r4f87a85a 112 112 } 113 113 114 ddf_fun_add_to_category(fun, "console");115 116 114 bound = true; 115 116 rc = ddf_fun_add_to_category(fun, "console"); 117 if (rc != EOK) { 118 ddf_msg(LVL_ERROR, "Error adding function 'a' to category " 119 "'console'."); 120 goto error; 121 } 117 122 118 123 fid = fibril_create(ski_con_fibril, con); -
uspace/drv/char/sun4v-con/sun4v-con.c
r433d52f r4f87a85a 74 74 ddf_fun_t *fun = NULL; 75 75 errno_t rc; 76 bool bound = false; 76 77 77 78 con->res = *res; … … 113 114 } 114 115 115 ddf_fun_add_to_category(fun, "console"); 116 bound = true; 117 118 rc = ddf_fun_add_to_category(fun, "console"); 119 if (rc != EOK) { 120 ddf_msg(LVL_ERROR, "Error adding function 'a' to category " 121 "'console'."); 122 goto error; 123 } 116 124 117 125 return EOK; … … 122 130 if (con->output_buffer != (niagara_output_buffer_t *) AS_AREA_ANY) 123 131 physmem_unmap((void *) con->output_buffer); 132 133 if (bound) 134 ddf_fun_unbind(fun); 124 135 125 136 if (fun != NULL)
Note:
See TracChangeset
for help on using the changeset viewer.