Changeset fe1776c2 in mainline for uspace/lib/usb/src/recognise.c
- Timestamp:
- 2011-02-11T12:41:11Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d81ef61c
- Parents:
- 78d1525 (diff), 5d4193c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/recognise.c
r78d1525 rfe1776c2 33 33 * @brief Functions for recognising kind of attached devices. 34 34 */ 35 #include <sys/types.h> 35 36 #include <usb_iface.h> 36 37 #include <usb/usbdrv.h> … … 359 360 { 360 361 static size_t device_name_index = 0; 362 static FIBRIL_MUTEX_INITIALIZE(device_name_index_mutex); 363 364 size_t this_device_name_index; 365 366 fibril_mutex_lock(&device_name_index_mutex); 367 this_device_name_index = device_name_index; 368 device_name_index++; 369 fibril_mutex_unlock(&device_name_index_mutex); 370 361 371 362 372 device_t *child = NULL; … … 374 384 * naming etc., something more descriptive could be created. 375 385 */ 376 rc = asprintf(&child_name, "usbdev%02zu", device_name_index);386 rc = asprintf(&child_name, "usbdev%02zu", this_device_name_index); 377 387 if (rc < 0) { 378 388 goto failure; … … 396 406 } 397 407 398 device_name_index++;399 400 408 return EOK; 401 409
Note:
See TracChangeset
for help on using the changeset viewer.