diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/s390/block/dcssblk.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c index 859f870552e3..5e083d1f57e7 100644 --- a/drivers/s390/block/dcssblk.c +++ b/drivers/s390/block/dcssblk.c | |||
@@ -193,6 +193,12 @@ dcssblk_segment_warn(int rc, char* seg_name) | |||
193 | } | 193 | } |
194 | } | 194 | } |
195 | 195 | ||
196 | static void dcssblk_unregister_callback(struct device *dev) | ||
197 | { | ||
198 | device_unregister(dev); | ||
199 | put_device(dev); | ||
200 | } | ||
201 | |||
196 | /* | 202 | /* |
197 | * device attribute for switching shared/nonshared (exclusive) | 203 | * device attribute for switching shared/nonshared (exclusive) |
198 | * operation (show + store) | 204 | * operation (show + store) |
@@ -276,8 +282,7 @@ removeseg: | |||
276 | blk_cleanup_queue(dev_info->dcssblk_queue); | 282 | blk_cleanup_queue(dev_info->dcssblk_queue); |
277 | dev_info->gd->queue = NULL; | 283 | dev_info->gd->queue = NULL; |
278 | put_disk(dev_info->gd); | 284 | put_disk(dev_info->gd); |
279 | device_unregister(dev); | 285 | rc = device_schedule_callback(dev, dcssblk_unregister_callback); |
280 | put_device(dev); | ||
281 | out: | 286 | out: |
282 | up_write(&dcssblk_devices_sem); | 287 | up_write(&dcssblk_devices_sem); |
283 | return rc; | 288 | return rc; |