diff options
Diffstat (limited to 'drivers/s390/cio/device.c')
-rw-r--r-- | drivers/s390/cio/device.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index bd6e8cf77fad..dc97cb9f227f 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -1065,17 +1065,16 @@ static int | |||
1065 | io_subchannel_remove (struct subchannel *sch) | 1065 | io_subchannel_remove (struct subchannel *sch) |
1066 | { | 1066 | { |
1067 | struct ccw_device *cdev; | 1067 | struct ccw_device *cdev; |
1068 | unsigned long flags; | ||
1069 | 1068 | ||
1070 | cdev = sch_get_cdev(sch); | 1069 | cdev = sch_get_cdev(sch); |
1071 | if (!cdev) | 1070 | if (!cdev) |
1072 | goto out_free; | 1071 | goto out_free; |
1073 | io_subchannel_quiesce(sch); | 1072 | io_subchannel_quiesce(sch); |
1074 | /* Set ccw device to not operational and drop reference. */ | 1073 | /* Set ccw device to not operational and drop reference. */ |
1075 | spin_lock_irqsave(cdev->ccwlock, flags); | 1074 | spin_lock_irq(cdev->ccwlock); |
1076 | sch_set_cdev(sch, NULL); | 1075 | sch_set_cdev(sch, NULL); |
1077 | cdev->private->state = DEV_STATE_NOT_OPER; | 1076 | cdev->private->state = DEV_STATE_NOT_OPER; |
1078 | spin_unlock_irqrestore(cdev->ccwlock, flags); | 1077 | spin_unlock_irq(cdev->ccwlock); |
1079 | ccw_device_unregister(cdev); | 1078 | ccw_device_unregister(cdev); |
1080 | out_free: | 1079 | out_free: |
1081 | kfree(sch->private); | 1080 | kfree(sch->private); |