Changeset b7fd2a0 in mainline for uspace/lib/drv/generic/driver.c
- Timestamp:
- 2018-01-13T03:10:29Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/driver.c
r36f0738 rb7fd2a0 124 124 125 125 char *dev_name = NULL; 126 int rc = async_data_write_accept((void **) &dev_name, true, 0, 0, 0, 0);126 errno_t rc = async_data_write_accept((void **) &dev_name, true, 0, 0, 0, 0); 127 127 if (rc != EOK) { 128 128 async_answer_0(iid, rc); … … 157 157 (void) parent_fun_handle; 158 158 159 int res = driver->driver_ops->dev_add(dev);159 errno_t res = driver->driver_ops->dev_add(dev); 160 160 161 161 if (res != EOK) { … … 189 189 } 190 190 191 int rc;191 errno_t rc; 192 192 193 193 if (driver->driver_ops->dev_remove != NULL) … … 217 217 } 218 218 219 int rc;219 errno_t rc; 220 220 221 221 if (driver->driver_ops->dev_gone != NULL) … … 253 253 254 254 /* Call driver entry point */ 255 int rc;255 errno_t rc; 256 256 257 257 if (driver->driver_ops->fun_online != NULL) … … 288 288 289 289 /* Call driver entry point */ 290 int rc;290 errno_t rc; 291 291 292 292 if (driver->driver_ops->fun_offline != NULL) … … 404 404 */ 405 405 406 int ret = EOK;406 errno_t ret = EOK; 407 407 /* Open device function */ 408 408 if (fun->ops != NULL && fun->ops->open != NULL) … … 666 666 * @return EOK on success, ENOMEM if out of memory 667 667 */ 668 int ddf_fun_set_name(ddf_fun_t *dev, const char *name)668 errno_t ddf_fun_set_name(ddf_fun_t *dev, const char *name) 669 669 { 670 670 assert(dev->name == NULL); … … 815 815 * 816 816 */ 817 int ddf_fun_bind(ddf_fun_t *fun)817 errno_t ddf_fun_bind(ddf_fun_t *fun) 818 818 { 819 819 assert(fun->bound == false); … … 822 822 823 823 add_to_functions_list(fun); 824 int res = devman_add_function(fun->name, fun->ftype, &fun->match_ids,824 errno_t res = devman_add_function(fun->name, fun->ftype, &fun->match_ids, 825 825 fun->dev->handle, &fun->handle); 826 826 if (res != EOK) { … … 843 843 * 844 844 */ 845 int ddf_fun_unbind(ddf_fun_t *fun)845 errno_t ddf_fun_unbind(ddf_fun_t *fun) 846 846 { 847 847 assert(fun->bound == true); 848 848 849 int res = devman_remove_function(fun->handle);849 errno_t res = devman_remove_function(fun->handle); 850 850 if (res != EOK) 851 851 return res; … … 864 864 * 865 865 */ 866 int ddf_fun_online(ddf_fun_t *fun)866 errno_t ddf_fun_online(ddf_fun_t *fun) 867 867 { 868 868 assert(fun->bound == true); 869 869 870 int res = devman_drv_fun_online(fun->handle);870 errno_t res = devman_drv_fun_online(fun->handle); 871 871 if (res != EOK) 872 872 return res; … … 882 882 * 883 883 */ 884 int ddf_fun_offline(ddf_fun_t *fun)884 errno_t ddf_fun_offline(ddf_fun_t *fun) 885 885 { 886 886 assert(fun->bound == true); 887 887 888 int res = devman_drv_fun_offline(fun->handle);888 errno_t res = devman_drv_fun_offline(fun->handle); 889 889 if (res != EOK) 890 890 return res; … … 906 906 * 907 907 */ 908 int ddf_fun_add_match_id(ddf_fun_t *fun, const char *match_id_str,908 errno_t ddf_fun_add_match_id(ddf_fun_t *fun, const char *match_id_str, 909 909 int match_score) 910 910 { … … 953 953 * 954 954 */ 955 int ddf_fun_add_to_category(ddf_fun_t *fun, const char *cat_name)955 errno_t ddf_fun_add_to_category(ddf_fun_t *fun, const char *cat_name) 956 956 { 957 957 assert(fun->bound == true); … … 974 974 */ 975 975 port_id_t port; 976 int rc = async_create_port(INTERFACE_DDF_DRIVER, driver_connection_driver,976 errno_t rc = async_create_port(INTERFACE_DDF_DRIVER, driver_connection_driver, 977 977 NULL, &port); 978 978 if (rc != EOK) {
Note:
See TracChangeset
for help on using the changeset viewer.