aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/sd.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 280d231a86ed..6598024531dd 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -86,16 +86,12 @@ MODULE_ALIAS_SCSI_DEVICE(TYPE_DISK);
86MODULE_ALIAS_SCSI_DEVICE(TYPE_MOD); 86MODULE_ALIAS_SCSI_DEVICE(TYPE_MOD);
87MODULE_ALIAS_SCSI_DEVICE(TYPE_RBC); 87MODULE_ALIAS_SCSI_DEVICE(TYPE_RBC);
88 88
89#define SD_PARTS 64
90
91#if !defined(CONFIG_DEBUG_BLOCK_EXT_DEVT) 89#if !defined(CONFIG_DEBUG_BLOCK_EXT_DEVT)
92#define SD_MINORS 16 90#define SD_MINORS 16
93#else 91#else
94#define SD_MINORS 1 92#define SD_MINORS 1
95#endif 93#endif
96 94
97#define SD_EXT_MINORS (SD_PARTS - SD_MINORS)
98
99static int sd_revalidate_disk(struct gendisk *); 95static int sd_revalidate_disk(struct gendisk *);
100static int sd_probe(struct device *); 96static int sd_probe(struct device *);
101static int sd_remove(struct device *); 97static int sd_remove(struct device *);
@@ -1811,7 +1807,7 @@ static int sd_probe(struct device *dev)
1811 if (!sdkp) 1807 if (!sdkp)
1812 goto out; 1808 goto out;
1813 1809
1814 gd = alloc_disk_ext(SD_MINORS, SD_EXT_MINORS); 1810 gd = alloc_disk(SD_MINORS);
1815 if (!gd) 1811 if (!gd)
1816 goto out_free; 1812 goto out_free;
1817 1813
@@ -1856,7 +1852,6 @@ static int sd_probe(struct device *dev)
1856 gd->major = sd_major((index & 0xf0) >> 4); 1852 gd->major = sd_major((index & 0xf0) >> 4);
1857 gd->first_minor = ((index & 0xf) << 4) | (index & 0xfff00); 1853 gd->first_minor = ((index & 0xf) << 4) | (index & 0xfff00);
1858 gd->minors = SD_MINORS; 1854 gd->minors = SD_MINORS;
1859 gd->ext_minors = SD_EXT_MINORS;
1860 gd->fops = &sd_fops; 1855 gd->fops = &sd_fops;
1861 1856
1862 if (index < 26) { 1857 if (index < 26) {
@@ -1880,7 +1875,7 @@ static int sd_probe(struct device *dev)
1880 blk_queue_prep_rq(sdp->request_queue, sd_prep_fn); 1875 blk_queue_prep_rq(sdp->request_queue, sd_prep_fn);
1881 1876
1882 gd->driverfs_dev = &sdp->sdev_gendev; 1877 gd->driverfs_dev = &sdp->sdev_gendev;
1883 gd->flags = GENHD_FL_DRIVERFS; 1878 gd->flags = GENHD_FL_EXT_DEVT | GENHD_FL_DRIVERFS;
1884 if (sdp->removable) 1879 if (sdp->removable)
1885 gd->flags |= GENHD_FL_REMOVABLE; 1880 gd->flags |= GENHD_FL_REMOVABLE;
1886 1881