spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Reviewed-by: Tom Rix <trix@redhat.com>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
 static struct class *fpga_bridge_class;
 
 /* Lock for adding/removing bridges to linked lists*/
-static spinlock_t bridge_list_lock;
+static DEFINE_SPINLOCK(bridge_list_lock);
 
 /**
  * fpga_bridge_enable - Enable transactions on the bridge
 
 static int __init fpga_bridge_dev_init(void)
 {
-       spin_lock_init(&bridge_list_lock);
-
        fpga_bridge_class = class_create(THIS_MODULE, "fpga_bridge");
        if (IS_ERR(fpga_bridge_class))
                return PTR_ERR(fpga_bridge_class);