summaryrefslogtreecommitdiff
path: root/components/drivers
diff options
context:
space:
mode:
authorzyh <[email protected]>2018-04-27 15:27:26 +0800
committerzyh <[email protected]>2018-04-27 15:27:26 +0800
commitc053119facd1854d5a7ce10add1487a6a04306c1 (patch)
treec72628ec83dbaf5052c0193ba1b7abe84452c4bd /components/drivers
parent4356db5b116bf81e46e1c6720bb1e05357527b9f (diff)
[Components][HOST]fix sem name
Diffstat (limited to 'components/drivers')
-rw-r--r--components/drivers/usb/usbhost/class/udisk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/drivers/usb/usbhost/class/udisk.c b/components/drivers/usb/usbhost/class/udisk.c
index 6a4e02fa9c..f8f47890f4 100644
--- a/components/drivers/usb/usbhost/class/udisk.c
+++ b/components/drivers/usb/usbhost/class/udisk.c
@@ -306,9 +306,9 @@ rt_err_t rt_udisk_run(struct uhintf* intf)
rt_memset(data, 0, sizeof(struct ustor_data));
data->intf = intf;
data->udisk_id = udisk_get_id();
- data->part.lock = rt_sem_create(sname, 1, RT_IPC_FLAG_FIFO);
rt_snprintf(dname, 6, "ud%d-%d", data->udisk_id, i);
rt_snprintf(sname, 8, "sem_ud%d", i);
+ data->part.lock = rt_sem_create(sname, 1, RT_IPC_FLAG_FIFO);
/* register sdcard device */
stor->dev[i].type = RT_Device_Class_Block;