diff options
author | Zheng Yongjun <zhengyongjun3@huawei.com> | 2020-12-29 21:49:27 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-01-05 15:43:41 -0800 |
commit | 447d871a0d08c20bf2a7573065e1fa08ab79c6df (patch) | |
tree | 5f814cc72ca003a0356992c788e77c48d553df8b /drivers/net/usb | |
parent | 5b34af861f0b4c61254ba6cf0aa295b520a26fc6 (diff) |
net: usb: Use DEFINE_SPINLOCK() for spinlock
spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/hso.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 2bb28db89432..ef6dd012b8c4 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c @@ -370,7 +370,7 @@ static struct usb_driver hso_driver; static struct tty_driver *tty_drv; static struct hso_device *serial_table[HSO_SERIAL_TTY_MINORS]; static struct hso_device *network_table[HSO_MAX_NET_DEVICES]; -static spinlock_t serial_table_lock; +static DEFINE_SPINLOCK(serial_table_lock); static const s32 default_port_spec[] = { HSO_INTF_MUX | HSO_PORT_NETWORK, @@ -3236,7 +3236,6 @@ static int __init hso_init(void) pr_info("%s\n", version); /* Initialise the serial table semaphore and table */ - spin_lock_init(&serial_table_lock); for (i = 0; i < HSO_SERIAL_TTY_MINORS; i++) serial_table[i] = NULL; |