mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 15:54:15 +08:00
6lowpan: revert: add missing spin_lock_init()
Revert the commit 768f7c7c12
to initialize
spinlock in the more preferable way and make it static to avoid sparse
warning.
Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d348446b88
commit
4d27de149b
@ -123,7 +123,7 @@ struct lowpan_fragment {
|
|||||||
|
|
||||||
static unsigned short fragment_tag;
|
static unsigned short fragment_tag;
|
||||||
static LIST_HEAD(lowpan_fragments);
|
static LIST_HEAD(lowpan_fragments);
|
||||||
spinlock_t flist_lock;
|
static DEFINE_SPINLOCK(flist_lock);
|
||||||
|
|
||||||
static inline struct
|
static inline struct
|
||||||
lowpan_dev_info *lowpan_dev_info(const struct net_device *dev)
|
lowpan_dev_info *lowpan_dev_info(const struct net_device *dev)
|
||||||
@ -1186,8 +1186,6 @@ static int lowpan_newlink(struct net *src_net, struct net_device *dev,
|
|||||||
list_add_tail(&entry->list, &lowpan_devices);
|
list_add_tail(&entry->list, &lowpan_devices);
|
||||||
mutex_unlock(&lowpan_dev_info(dev)->dev_list_mtx);
|
mutex_unlock(&lowpan_dev_info(dev)->dev_list_mtx);
|
||||||
|
|
||||||
spin_lock_init(&flist_lock);
|
|
||||||
|
|
||||||
register_netdevice(dev);
|
register_netdevice(dev);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user