OSDN Git Service

s390/cio: use DEFINE_SPINLOCK() for spinlock
authorShixin Liu <liushixin2@huawei.com>
Mon, 29 Mar 2021 09:40:18 +0000 (17:40 +0800)
committerHeiko Carstens <hca@linux.ibm.com>
Mon, 5 Apr 2021 09:30:57 +0000 (11:30 +0200)
static spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().

Signed-off-by: Shixin Liu <liushixin2@huawei.com>
Acked-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/cio/css.c

index 253ab4e..f01ef63 100644 (file)
@@ -651,13 +651,12 @@ static void css_sch_todo(struct work_struct *work)
 }
 
 static struct idset *slow_subchannel_set;
-static spinlock_t slow_subchannel_lock;
+static DEFINE_SPINLOCK(slow_subchannel_lock);
 static wait_queue_head_t css_eval_wq;
 static atomic_t css_eval_scheduled;
 
 static int __init slow_subchannel_init(void)
 {
-       spin_lock_init(&slow_subchannel_lock);
        atomic_set(&css_eval_scheduled, 0);
        init_waitqueue_head(&css_eval_wq);
        slow_subchannel_set = idset_sch_new();