Changes in uspace/lib/usbdev/src/driver.c [c01987c:d46ceb2b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/src/driver.c
rc01987c rd46ceb2b 117 117 } 118 118 119 /** Callback when the driver is asked to online a specific function. 120 * 121 * This callback is a wrapper for USB specific version of @c fun_online. 122 * 123 * @param gen_dev Device function structure as prepared by DDF. 124 * @return Error code. 125 */ 126 static int generic_function_online(ddf_fun_t *fun) 127 { 128 assert(driver); 129 assert(driver->ops); 130 if (driver->ops->function_online == NULL) 131 return ENOTSUP; 132 return driver->ops->function_online(fun); 133 } 134 135 /** Callback when the driver is asked to offline a specific function. 136 * 137 * This callback is a wrapper for USB specific version of @c fun_offline. 138 * 139 * @param gen_dev Device function structure as prepared by DDF. 140 * @return Error code. 141 */ 142 static int generic_function_offline(ddf_fun_t *fun) 143 { 144 assert(driver); 145 assert(driver->ops); 146 if (driver->ops->function_offline == NULL) 147 return ENOTSUP; 148 return driver->ops->function_offline(fun); 149 } 150 119 151 static driver_ops_t generic_driver_ops = { 120 152 .dev_add = generic_device_add, 121 153 .dev_remove = generic_device_remove, 122 154 .dev_gone = generic_device_gone, 155 .fun_online = generic_function_online, 156 .fun_offline = generic_function_offline, 123 157 }; 124 158 static driver_t generic_driver = {
Note:
See TracChangeset
for help on using the changeset viewer.