Changeset 5a6cc679 in mainline for uspace/lib/drv/generic/driver.c
- Timestamp:
- 2018-01-31T02:21:24Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a0a9cc2
- Parents:
- 132ab5d1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/driver.c
r132ab5d1 r5a6cc679 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) … … 222 222 } 223 223 224 int rc;224 errno_t rc; 225 225 226 226 if (driver->driver_ops->dev_gone != NULL) … … 263 263 264 264 /* Call driver entry point */ 265 int rc;265 errno_t rc; 266 266 267 267 if (driver->driver_ops->fun_online != NULL) … … 298 298 299 299 /* Call driver entry point */ 300 int rc;300 errno_t rc; 301 301 302 302 if (driver->driver_ops->fun_offline != NULL) … … 414 414 */ 415 415 416 int ret = EOK;416 errno_t ret = EOK; 417 417 /* Open device function */ 418 418 if (fun->ops != NULL && fun->ops->open != NULL) … … 676 676 * @return EOK on success, ENOMEM if out of memory 677 677 */ 678 int ddf_fun_set_name(ddf_fun_t *dev, const char *name)678 errno_t ddf_fun_set_name(ddf_fun_t *dev, const char *name) 679 679 { 680 680 assert(dev->name == NULL); … … 825 825 * 826 826 */ 827 int ddf_fun_bind(ddf_fun_t *fun)827 errno_t ddf_fun_bind(ddf_fun_t *fun) 828 828 { 829 829 assert(fun->bound == false); … … 832 832 833 833 add_to_functions_list(fun); 834 int res = devman_add_function(fun->name, fun->ftype, &fun->match_ids,834 errno_t res = devman_add_function(fun->name, fun->ftype, &fun->match_ids, 835 835 fun->dev->handle, &fun->handle); 836 836 if (res != EOK) { … … 853 853 * 854 854 */ 855 int ddf_fun_unbind(ddf_fun_t *fun)855 errno_t ddf_fun_unbind(ddf_fun_t *fun) 856 856 { 857 857 assert(fun->bound == true); 858 858 859 int res = devman_remove_function(fun->handle);859 errno_t res = devman_remove_function(fun->handle); 860 860 if (res != EOK) 861 861 return res; … … 874 874 * 875 875 */ 876 int ddf_fun_online(ddf_fun_t *fun)876 errno_t ddf_fun_online(ddf_fun_t *fun) 877 877 { 878 878 assert(fun->bound == true); 879 879 880 int res = devman_drv_fun_online(fun->handle);880 errno_t res = devman_drv_fun_online(fun->handle); 881 881 if (res != EOK) 882 882 return res; … … 892 892 * 893 893 */ 894 int ddf_fun_offline(ddf_fun_t *fun)894 errno_t ddf_fun_offline(ddf_fun_t *fun) 895 895 { 896 896 assert(fun->bound == true); 897 897 898 int res = devman_drv_fun_offline(fun->handle);898 errno_t res = devman_drv_fun_offline(fun->handle); 899 899 if (res != EOK) 900 900 return res; … … 916 916 * 917 917 */ 918 int ddf_fun_add_match_id(ddf_fun_t *fun, const char *match_id_str,918 errno_t ddf_fun_add_match_id(ddf_fun_t *fun, const char *match_id_str, 919 919 int match_score) 920 920 { … … 963 963 * 964 964 */ 965 int ddf_fun_add_to_category(ddf_fun_t *fun, const char *cat_name)965 errno_t ddf_fun_add_to_category(ddf_fun_t *fun, const char *cat_name) 966 966 { 967 967 assert(fun->bound == true); … … 984 984 */ 985 985 port_id_t port; 986 int rc = async_create_port(INTERFACE_DDF_DRIVER, driver_connection_driver,986 errno_t rc = async_create_port(INTERFACE_DDF_DRIVER, driver_connection_driver, 987 987 NULL, &port); 988 988 if (rc != EOK) {
Note:
See TracChangeset
for help on using the changeset viewer.