diff options
Diffstat (limited to 'drivers/ide/ide-disk.c')
-rw-r--r-- | drivers/ide/ide-disk.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 07ef88bd109b..7a88de9ada29 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c | |||
@@ -41,6 +41,10 @@ | |||
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 | #define IDE_DISK_MINORS IDE_DISK_PARTS | ||
46 | #define IDE_DISK_EXT_MINORS (IDE_DISK_PARTS - IDE_DISK_MINORS) | ||
47 | |||
44 | struct ide_disk_obj { | 48 | struct ide_disk_obj { |
45 | ide_drive_t *drive; | 49 | ide_drive_t *drive; |
46 | ide_driver_t *driver; | 50 | ide_driver_t *driver; |
@@ -1151,8 +1155,8 @@ static int ide_disk_probe(ide_drive_t *drive) | |||
1151 | if (!idkp) | 1155 | if (!idkp) |
1152 | goto failed; | 1156 | goto failed; |
1153 | 1157 | ||
1154 | g = alloc_disk_node(1 << PARTN_BITS, | 1158 | g = alloc_disk_ext_node(IDE_DISK_MINORS, IDE_DISK_EXT_MINORS, |
1155 | hwif_to_node(drive->hwif)); | 1159 | hwif_to_node(drive->hwif)); |
1156 | if (!g) | 1160 | if (!g) |
1157 | goto out_free_idkp; | 1161 | goto out_free_idkp; |
1158 | 1162 | ||
@@ -1178,7 +1182,8 @@ static int ide_disk_probe(ide_drive_t *drive) | |||
1178 | } else | 1182 | } else |
1179 | drive->attach = 1; | 1183 | drive->attach = 1; |
1180 | 1184 | ||
1181 | g->minors = 1 << PARTN_BITS; | 1185 | g->minors = IDE_DISK_MINORS; |
1186 | g->ext_minors = IDE_DISK_EXT_MINORS; | ||
1182 | g->driverfs_dev = &drive->gendev; | 1187 | g->driverfs_dev = &drive->gendev; |
1183 | g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0; | 1188 | g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0; |
1184 | set_capacity(g, idedisk_capacity(drive)); | 1189 | set_capacity(g, idedisk_capacity(drive)); |