Changeset 6626bba9 in mainline for uspace/drv/bus/usb/usbhub/usbhub.c
- Timestamp:
- 2011-10-12T19:04:00Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 205f0766
- Parents:
- 196fbb0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhub/usbhub.c
r196fbb0 r6626bba9 68 68 69 69 static int usb_set_first_configuration(usb_device_t *usb_device); 70 static usb_hub_ info_t * usb_hub_info_create(usb_device_t *usb_dev);71 static int usb_hub_process_hub_specific_info(usb_hub_ info_t *hub_info);72 static void usb_hub_over_current(const usb_hub_ info_t *hub_info,70 static usb_hub_dev_t * usb_hub_dev_create(usb_device_t *usb_dev); 71 static int usb_hub_process_hub_specific_info(usb_hub_dev_t *hub_info); 72 static void usb_hub_over_current(const usb_hub_dev_t *hub_info, 73 73 usb_hub_status_t status); 74 static void usb_hub_global_interrupt(const usb_hub_ info_t *hub_info);74 static void usb_hub_global_interrupt(const usb_hub_dev_t *hub_info); 75 75 static void usb_hub_polling_terminated_callback(usb_device_t *device, 76 76 bool was_error, void *data); … … 100 100 assert(usb_dev); 101 101 /* Create driver soft-state structure */ 102 usb_hub_ info_t *hub_info = usb_hub_info_create(usb_dev);102 usb_hub_dev_t *hub_info = usb_hub_dev_create(usb_dev); 103 103 if (hub_info == NULL) { 104 104 usb_log_error("Failed to create hun driver structure.\n"); … … 174 174 * @param change_bitmap Bitmap of changed ports. 175 175 * @param change_bitmap_size Size of the bitmap in bytes. 176 * @param arg Custom argument, points to @c usb_hub_ info_t.176 * @param arg Custom argument, points to @c usb_hub_dev_t. 177 177 * @return Whether to continue polling. 178 178 */ … … 181 181 { 182 182 usb_log_debug("hub_port_changes_callback\n"); 183 usb_hub_ info_t *hub = arg;183 usb_hub_dev_t *hub = arg; 184 184 assert(hub); 185 185 … … 207 207 /*----------------------------------------------------------------------------*/ 208 208 /** 209 * create usb_hub_ info_t structure209 * create usb_hub_dev_t structure 210 210 * 211 211 * Does only basic copying of known information into new structure. 212 212 * @param usb_dev usb device structure 213 * @return basic usb_hub_ info_t structure214 */ 215 static usb_hub_ info_t * usb_hub_info_create(usb_device_t *usb_dev)213 * @return basic usb_hub_dev_t structure 214 */ 215 static usb_hub_dev_t * usb_hub_dev_create(usb_device_t *usb_dev) 216 216 { 217 217 assert(usb_dev); 218 usb_hub_ info_t *info = malloc(sizeof(usb_hub_info_t));218 usb_hub_dev_t *info = malloc(sizeof(usb_hub_dev_t)); 219 219 if (!info) 220 220 return NULL; … … 241 241 * @return error code 242 242 */ 243 static int usb_hub_process_hub_specific_info(usb_hub_ info_t *hub_info)243 static int usb_hub_process_hub_specific_info(usb_hub_dev_t *hub_info) 244 244 { 245 245 assert(hub_info); … … 359 359 * @return error code 360 360 */ 361 static void usb_hub_over_current(const usb_hub_ info_t *hub_info,361 static void usb_hub_over_current(const usb_hub_dev_t *hub_info, 362 362 usb_hub_status_t status) 363 363 { … … 398 398 * @param hub_info hub instance 399 399 */ 400 static void usb_hub_global_interrupt(const usb_hub_ info_t *hub_info)400 static void usb_hub_global_interrupt(const usb_hub_dev_t *hub_info) 401 401 { 402 402 assert(hub_info); … … 459 459 * @param device usb device afected 460 460 * @param was_error indicates that the fibril is stoped due to an error 461 * @param data pointer to usb_hub_ info_t structure461 * @param data pointer to usb_hub_dev_t structure 462 462 */ 463 463 static void usb_hub_polling_terminated_callback(usb_device_t *device, 464 464 bool was_error, void *data) 465 465 { 466 usb_hub_ info_t *hub = data;466 usb_hub_dev_t *hub = data; 467 467 assert(hub); 468 468
Note:
See TracChangeset
for help on using the changeset viewer.