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