Changes in uspace/drv/infrastructure/root/root.c [e882e3a:deac215e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/infrastructure/root/root.c
re882e3a rdeac215e 53 53 #include <ddf/driver.h> 54 54 #include <ddf/log.h> 55 #include <devman.h> 56 #include <ipc/devman.h> 55 57 56 58 #define NAME "root" … … 64 66 #define VIRTUAL_FUN_MATCH_SCORE 100 65 67 66 static int root_ dev_add(ddf_dev_t *dev);68 static int root_add_device(ddf_dev_t *dev); 67 69 static int root_fun_online(ddf_fun_t *fun); 68 70 static int root_fun_offline(ddf_fun_t *fun); … … 70 72 /** The root device driver's standard operations. */ 71 73 static driver_ops_t root_ops = { 72 . dev_add = &root_dev_add,74 .add_device = &root_add_device, 73 75 .fun_online = &root_fun_online, 74 76 .fun_offline = &root_fun_offline … … 156 158 if (asprintf(&match_id, PLATFORM_FUN_MATCH_ID_FMT, platform) == -1) { 157 159 ddf_msg(LVL_ERROR, "Memory allocation failed."); 158 free(platform); 159 return ENOMEM; 160 } 161 162 free(platform); 160 return ENOMEM; 161 } 163 162 164 163 /* Add function. */ … … 170 169 if (fun == NULL) { 171 170 ddf_msg(LVL_ERROR, "Error creating function %s", name); 172 free(match_id);173 171 return ENOMEM; 174 172 } … … 178 176 ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s", 179 177 name); 180 free(match_id);181 178 ddf_fun_destroy(fun); 182 179 return rc; … … 201 198 * of HW and pseudo devices). 202 199 */ 203 static int root_ dev_add(ddf_dev_t *dev)204 { 205 ddf_msg(LVL_DEBUG, "root_ dev_add, device handle=%" PRIun,200 static int root_add_device(ddf_dev_t *dev) 201 { 202 ddf_msg(LVL_DEBUG, "root_add_device, device handle=%" PRIun, 206 203 dev->handle); 207 204 … … 211 208 * vital for the system. 212 209 */ 213 (void)add_virtual_root_fun(dev);210 add_virtual_root_fun(dev); 214 211 215 212 /* Register root device's children. */
Note:
See TracChangeset
for help on using the changeset viewer.