mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
cavium/liquidio: 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>
This commit is contained in:
parent
1454c51d1e
commit
48b219a262
1 changed files with 1 additions and 2 deletions
|
@ -545,7 +545,7 @@ static atomic_t adapter_fw_states[MAX_OCTEON_DEVICES];
|
|||
|
||||
static u32 octeon_device_count;
|
||||
/* locks device array (i.e. octeon_device[]) */
|
||||
static spinlock_t octeon_devices_lock;
|
||||
static DEFINE_SPINLOCK(octeon_devices_lock);
|
||||
|
||||
static struct octeon_core_setup core_setup[MAX_OCTEON_DEVICES];
|
||||
|
||||
|
@ -563,7 +563,6 @@ void octeon_init_device_list(int conf_type)
|
|||
memset(octeon_device, 0, (sizeof(void *) * MAX_OCTEON_DEVICES));
|
||||
for (i = 0; i < MAX_OCTEON_DEVICES; i++)
|
||||
oct_set_config_info(i, conf_type);
|
||||
spin_lock_init(&octeon_devices_lock);
|
||||
}
|
||||
|
||||
static void *__retrieve_octeon_config_info(struct octeon_device *oct,
|
||||
|
|
Loading…
Reference in a new issue