summaryrefslogtreecommitdiff
path: root/drivers/s390/cio/chsc_sch.c
diff options
context:
space:
mode:
authorHalil Pasic <pasic@linux.ibm.com>2023-11-01 14:57:51 +0300
committerAlexander Gordeev <agordeev@linux.ibm.com>2023-12-12 16:41:58 +0300
commitb8fa3e90965eeb2f83aa637ba0d0d6fd2a524004 (patch)
treec9cf4c5d9fcfbb8762d066bae352fa948044531f /drivers/s390/cio/chsc_sch.c
parent7fe228e1866f3a270a1f963c9f2ae3ba1eae7411 (diff)
downloadlinux-b8fa3e90965eeb2f83aa637ba0d0d6fd2a524004.tar.xz
s390/cio: make sch->lock spinlock pointer a member
The lock member of struct subchannel used to be a spinlock, but became a pointer to a spinlock with commit 2ec2298412e1 ("[S390] subchannel lock conversion."). This might have been justified back then, but with the current state of affairs, there is no reason to manage a separate spinlock object. Let's simplify things and pull the spinlock back into struct subchannel. Signed-off-by: Halil Pasic <pasic@linux.ibm.com> Reviewed-by: Vineeth Vijayan <vneethv@linux.ibm.com> Link: https://lore.kernel.org/r/20231101115751.2308307-1-pasic@linux.ibm.com Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Diffstat (limited to 'drivers/s390/cio/chsc_sch.c')
-rw-r--r--drivers/s390/cio/chsc_sch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/s390/cio/chsc_sch.c b/drivers/s390/cio/chsc_sch.c
index 180ab899289c..902237d0baef 100644
--- a/drivers/s390/cio/chsc_sch.c
+++ b/drivers/s390/cio/chsc_sch.c
@@ -211,10 +211,10 @@ static int chsc_async(struct chsc_async_area *chsc_area,
chsc_area->header.key = PAGE_DEFAULT_KEY >> 4;
while ((sch = chsc_get_next_subchannel(sch))) {
- spin_lock(sch->lock);
+ spin_lock(&sch->lock);
private = dev_get_drvdata(&sch->dev);
if (private->request) {
- spin_unlock(sch->lock);
+ spin_unlock(&sch->lock);
ret = -EBUSY;
continue;
}
@@ -239,7 +239,7 @@ static int chsc_async(struct chsc_async_area *chsc_area,
default:
ret = -ENODEV;
}
- spin_unlock(sch->lock);
+ spin_unlock(&sch->lock);
CHSC_MSG(2, "chsc on 0.%x.%04x returned cc=%d\n",
sch->schid.ssid, sch->schid.sch_no, cc);
if (ret == -EINPROGRESS)