diff options
Diffstat (limited to 'drivers/ide/ide-disk.c')
-rw-r--r-- | drivers/ide/ide-disk.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index a072df5053ae..29c8ae752683 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c | |||
@@ -41,16 +41,12 @@ | |||
41 | #include <asm/io.h> | 41 | #include <asm/io.h> |
42 | #include <asm/div64.h> | 42 | #include <asm/div64.h> |
43 | 43 | ||
44 | #define IDE_DISK_PARTS (1 << PARTN_BITS) | ||
45 | |||
46 | #if !defined(CONFIG_DEBUG_BLOCK_EXT_DEVT) | 44 | #if !defined(CONFIG_DEBUG_BLOCK_EXT_DEVT) |
47 | #define IDE_DISK_MINORS IDE_DISK_PARTS | 45 | #define IDE_DISK_MINORS (1 << PARTN_BITS) |
48 | #else | 46 | #else |
49 | #define IDE_DISK_MINORS 1 | 47 | #define IDE_DISK_MINORS 1 |
50 | #endif | 48 | #endif |
51 | 49 | ||
52 | #define IDE_DISK_EXT_MINORS (IDE_DISK_PARTS - IDE_DISK_MINORS) | ||
53 | |||
54 | struct ide_disk_obj { | 50 | struct ide_disk_obj { |
55 | ide_drive_t *drive; | 51 | ide_drive_t *drive; |
56 | ide_driver_t *driver; | 52 | ide_driver_t *driver; |
@@ -1161,8 +1157,7 @@ static int ide_disk_probe(ide_drive_t *drive) | |||
1161 | if (!idkp) | 1157 | if (!idkp) |
1162 | goto failed; | 1158 | goto failed; |
1163 | 1159 | ||
1164 | g = alloc_disk_ext_node(IDE_DISK_MINORS, IDE_DISK_EXT_MINORS, | 1160 | g = alloc_disk_node(IDE_DISK_MINORS, hwif_to_node(drive->hwif)); |
1165 | hwif_to_node(drive->hwif)); | ||
1166 | if (!g) | 1161 | if (!g) |
1167 | goto out_free_idkp; | 1162 | goto out_free_idkp; |
1168 | 1163 | ||
@@ -1189,9 +1184,10 @@ static int ide_disk_probe(ide_drive_t *drive) | |||
1189 | drive->attach = 1; | 1184 | drive->attach = 1; |
1190 | 1185 | ||
1191 | g->minors = IDE_DISK_MINORS; | 1186 | g->minors = IDE_DISK_MINORS; |
1192 | g->ext_minors = IDE_DISK_EXT_MINORS; | ||
1193 | g->driverfs_dev = &drive->gendev; | 1187 | g->driverfs_dev = &drive->gendev; |
1194 | g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0; | 1188 | g->flags |= GENHD_FL_EXT_DEVT; |
1189 | if (drive->removable) | ||
1190 | g->flags |= GENHD_FL_REMOVABLE; | ||
1195 | set_capacity(g, idedisk_capacity(drive)); | 1191 | set_capacity(g, idedisk_capacity(drive)); |
1196 | g->fops = &idedisk_ops; | 1192 | g->fops = &idedisk_ops; |
1197 | add_disk(g); | 1193 | add_disk(g); |