diff options
| -rw-r--r-- | drivers/block/mtip32xx/mtip32xx.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index 11cc9522cdd4..2d0d52f6ee2a 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/block/mtip32xx/mtip32xx.c | |||
| @@ -4053,26 +4053,24 @@ static int mtip_block_remove(struct driver_data *dd) | |||
| 4053 | */ | 4053 | */ |
| 4054 | static int mtip_block_shutdown(struct driver_data *dd) | 4054 | static int mtip_block_shutdown(struct driver_data *dd) |
| 4055 | { | 4055 | { |
| 4056 | dev_info(&dd->pdev->dev, | ||
| 4057 | "Shutting down %s ...\n", dd->disk->disk_name); | ||
| 4058 | |||
| 4059 | /* Delete our gendisk structure, and cleanup the blk queue. */ | 4056 | /* Delete our gendisk structure, and cleanup the blk queue. */ |
| 4060 | if (dd->disk) { | 4057 | if (dd->disk) { |
| 4061 | if (dd->disk->queue) | 4058 | dev_info(&dd->pdev->dev, |
| 4059 | "Shutting down %s ...\n", dd->disk->disk_name); | ||
| 4060 | |||
| 4061 | if (dd->disk->queue) { | ||
| 4062 | del_gendisk(dd->disk); | 4062 | del_gendisk(dd->disk); |
| 4063 | else | 4063 | blk_cleanup_queue(dd->queue); |
| 4064 | } else | ||
| 4064 | put_disk(dd->disk); | 4065 | put_disk(dd->disk); |
| 4066 | dd->disk = NULL; | ||
| 4067 | dd->queue = NULL; | ||
| 4065 | } | 4068 | } |
| 4066 | 4069 | ||
| 4067 | |||
| 4068 | spin_lock(&rssd_index_lock); | 4070 | spin_lock(&rssd_index_lock); |
| 4069 | ida_remove(&rssd_index_ida, dd->index); | 4071 | ida_remove(&rssd_index_ida, dd->index); |
| 4070 | spin_unlock(&rssd_index_lock); | 4072 | spin_unlock(&rssd_index_lock); |
| 4071 | 4073 | ||
| 4072 | blk_cleanup_queue(dd->queue); | ||
| 4073 | dd->disk = NULL; | ||
| 4074 | dd->queue = NULL; | ||
| 4075 | |||
| 4076 | mtip_hw_shutdown(dd); | 4074 | mtip_hw_shutdown(dd); |
| 4077 | return 0; | 4075 | return 0; |
| 4078 | } | 4076 | } |
