Changeset 5a6cc679 in mainline for uspace/lib/usbdev/src/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/usbdev/src/driver.c
r132ab5d1 r5a6cc679 52 52 * @return Error code. 53 53 */ 54 static int generic_device_add(ddf_dev_t *gen_dev)54 static errno_t generic_device_add(ddf_dev_t *gen_dev) 55 55 { 56 56 assert(driver); … … 60 60 /* Initialize generic USB driver data. */ 61 61 const char *err_msg = NULL; 62 int rc = usb_device_create_ddf(gen_dev, driver->endpoints, &err_msg);62 errno_t rc = usb_device_create_ddf(gen_dev, driver->endpoints, &err_msg); 63 63 if (rc != EOK) { 64 64 usb_log_error("USB device `%s' init failed (%s): %s.", … … 81 81 * @return Error code. 82 82 */ 83 static int generic_device_remove(ddf_dev_t *gen_dev)83 static errno_t generic_device_remove(ddf_dev_t *gen_dev) 84 84 { 85 85 assert(driver); … … 90 90 /* Just tell the driver to stop whatever it is doing */ 91 91 usb_device_t *usb_dev = ddf_dev_data_get(gen_dev); 92 int ret = driver->ops->device_remove(usb_dev);92 const errno_t ret = driver->ops->device_remove(usb_dev); 93 93 if (ret != EOK) 94 94 return ret; … … 105 105 * @return Error code. 106 106 */ 107 static int generic_device_gone(ddf_dev_t *gen_dev)107 static errno_t generic_device_gone(ddf_dev_t *gen_dev) 108 108 { 109 109 assert(driver); … … 112 112 return ENOTSUP; 113 113 usb_device_t *usb_dev = ddf_dev_data_get(gen_dev); 114 const int ret = driver->ops->device_gone(usb_dev);114 const errno_t ret = driver->ops->device_gone(usb_dev); 115 115 if (ret == EOK) 116 116 usb_device_destroy_ddf(gen_dev);
Note:
See TracChangeset
for help on using the changeset viewer.