summaryrefslogtreecommitdiffstats
path: root/drivers/block/mtip32xx
diff options
context:
space:
mode:
authorAsai Thambi SP <asamymuthupa@micron.com>2015-05-11 15:55:26 -0700
committerJens Axboe <axboe@fb.com>2015-06-16 08:24:52 -0600
commit75787265d61fdce212c45805b36779754392d034 (patch)
tree55d2163cf0832aad831056714bce81908440aea9 /drivers/block/mtip32xx
parent284eb9a202a24fec4aed02d7526abc29827f6cbb (diff)
downloadlinux-75787265d61fdce212c45805b36779754392d034.tar.bz2
mtip32xx: fix minor number
When a device is surprise removed and inserted, it is assigned a new minor number because driver use multiples of 'instance' number. Modified to use the multiples of 'index' for minor number. Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block/mtip32xx')
-rw-r--r--drivers/block/mtip32xx/mtip32xx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index 378125004b6c..0b223e3058c0 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -3857,7 +3857,8 @@ static int mtip_block_initialize(struct driver_data *dd)
dd->disk->driverfs_dev = &dd->pdev->dev;
dd->disk->major = dd->major;
- dd->disk->first_minor = dd->instance * MTIP_MAX_MINORS;
+ dd->disk->first_minor = index * MTIP_MAX_MINORS;
+ dd->disk->minors = MTIP_MAX_MINORS;
dd->disk->fops = &mtip_block_ops;
dd->disk->private_data = dd;
dd->index = index;