Changeset 33b8d024 in mainline for uspace/drv
- Timestamp:
- 2018-01-16T20:38:46Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2467b41
- Parents:
- d39c46e0
- Location:
- uspace/drv
- Files:
-
- 2 edited
-
bus/usb/vhc/hub/virthub.c (modified) (1 diff)
-
platform/amdm37x/main.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/vhc/hub/virthub.c
rd39c46e0 r33b8d024 156 156 dev->descriptors = &descriptors; 157 157 dev->address = 0; 158 dev->name = str_dup(name); 159 if (!dev->name) 158 159 char *n = str_dup(name); 160 if (!n) 160 161 return ENOMEM; 161 162 162 163 hub_t *hub = malloc(sizeof(hub_t)); 163 164 if (hub == NULL) { 164 free( dev->name);165 free(n); 165 166 return ENOMEM; 166 167 } 167 168 169 dev->name = n; 168 170 hub_init(hub); 169 171 dev->device_data = hub; -
uspace/drv/platform/amdm37x/main.c
rd39c46e0 r33b8d024 49 49 typedef struct { 50 50 const char *name; 51 match_id_t match_id; 51 const char *id; 52 int score; 52 53 hw_resource_list_t hw_resources; 53 54 } amdm37x_fun_t; … … 133 134 { 134 135 .name = "ohci", 135 .match_id = { .id = "usb/host=ohci", .score = 90 }, 136 .id = "usb/host=ohci", 137 .score = 90, 136 138 .hw_resources = { .resources = ohci_res, .count = ARRAY_SIZE(ohci_res) } 137 139 }, 138 140 { 139 141 .name = "ehci", 140 .match_id = { .id = "usb/host=ehci", .score = 90 }, 142 .id = "usb/host=ehci", 143 .score = 90, 141 144 .hw_resources = { .resources = ehci_res, .count = ARRAY_SIZE(ehci_res) } 142 145 }, 143 146 { 144 147 .name = "fb", 145 .match_id = { .id = "amdm37x&dispc", .score = 90 }, 148 .id = "amdm37x&dispc", 149 .score = 90, 146 150 .hw_resources = { .resources = disp_res, .count = ARRAY_SIZE(disp_res) } 147 151 }, … … 174 178 175 179 /* Add match id */ 176 errno_t ret = ddf_fun_add_match_id(fnode, 177 fun->match_id.id, fun->match_id.score); 180 errno_t ret = ddf_fun_add_match_id(fnode, fun->id, fun->score); 178 181 if (ret != EOK) { 179 182 ddf_fun_destroy(fnode);
Note:
See TracChangeset
for help on using the changeset viewer.
