Commit 7c53624c authored by Zheng Yongjun's avatar Zheng Yongjun Committed by Greg Kroah-Hartman

usb: host: u132-hcd: use DEFINE_MUTEX() for mutex lock

mutex lock can be initialized automatically with DEFINE_MUTEX()
rather than explicitly calling mutex_init().
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarZheng Yongjun <zhengyongjun3@huawei.com>
Link: https://lore.kernel.org/r/20210405101434.14878-1-zhengyongjun3@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9c207609
...@@ -78,7 +78,7 @@ static DECLARE_WAIT_QUEUE_HEAD(u132_hcd_wait); ...@@ -78,7 +78,7 @@ static DECLARE_WAIT_QUEUE_HEAD(u132_hcd_wait);
* u132_module_lock exists to protect access to global variables * u132_module_lock exists to protect access to global variables
* *
*/ */
static struct mutex u132_module_lock; static DEFINE_MUTEX(u132_module_lock);
static int u132_exiting; static int u132_exiting;
static int u132_instances; static int u132_instances;
/* /*
...@@ -3190,7 +3190,6 @@ static int __init u132_hcd_init(void) ...@@ -3190,7 +3190,6 @@ static int __init u132_hcd_init(void)
int retval; int retval;
u132_instances = 0; u132_instances = 0;
u132_exiting = 0; u132_exiting = 0;
mutex_init(&u132_module_lock);
if (usb_disabled()) if (usb_disabled())
return -ENODEV; return -ENODEV;
printk(KERN_INFO "driver %s\n", hcd_name); printk(KERN_INFO "driver %s\n", hcd_name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment