tag | line | file | source code |
gd | 1838 | drivers/block/ide-cd.c | HWIF(drive)->gd->sizes[drive->select.b.unit << PARTN_BITS] |
gd | 497 | drivers/block/ide.c | static void ide_geninit (struct gendisk *gd) |
gd | 500 | drivers/block/ide.c | ide_hwif_t *hwif = gd->real_devices; |
gd | 502 | drivers/block/ide.c | for (unit = 0; unit < gd->nr_real; ++unit) { |
gd | 527 | drivers/block/ide.c | struct gendisk *gd; |
gd | 537 | drivers/block/ide.c | gd = kmalloc (sizeof(struct gendisk), GFP_KERNEL); |
gd | 538 | drivers/block/ide.c | gd->sizes = kmalloc (minors * sizeof(int), GFP_KERNEL); |
gd | 539 | drivers/block/ide.c | gd->part = kmalloc (minors * sizeof(struct hd_struct), GFP_KERNEL); |
gd | 548 | drivers/block/ide.c | hwif->drives[unit].part = &gd->part[unit << PARTN_BITS]; |
gd | 550 | drivers/block/ide.c | gd->major = hwif->major; /* our major device number */ |
gd | 551 | drivers/block/ide.c | gd->major_name = IDE_MAJOR_NAME; /* treated special in genhd.c */ |
gd | 552 | drivers/block/ide.c | gd->minor_shift = PARTN_BITS; /* num bits for partitions */ |
gd | 553 | drivers/block/ide.c | gd->max_p = 1<<PARTN_BITS; /* 1 + max partitions / drive */ |
gd | 554 | drivers/block/ide.c | gd->max_nr = units; /* max num real drives */ |
gd | 555 | drivers/block/ide.c | gd->nr_real = units; /* current num real drives */ |
gd | 556 | drivers/block/ide.c | gd->init = ide_geninit; /* initialization function */ |
gd | 557 | drivers/block/ide.c | gd->real_devices= hwif; /* ptr to internal data */ |
gd | 559 | drivers/block/ide.c | gd->next = gendisk_head; /* link new major into list */ |
gd | 560 | drivers/block/ide.c | hwif->gd = gendisk_head = gd; |
gd | 1823 | drivers/block/ide.c | resetup_one_dev(HWIF(drive)->gd, drive->select.b.unit); |
gd | 3113 | drivers/block/ide.c | hwif->gd->real_devices = hwif->drives[0].name; |
gd | 3114 | drivers/block/ide.c | for (i = 0; i < hwif->gd->nr_real; i++) |
gd | 3124 | drivers/block/ide.c | struct gendisk *prev_gd, *gd; |
gd | 3140 | drivers/block/ide.c | gd = gendisk_head; prev_gd = NULL; |
gd | 3141 | drivers/block/ide.c | while (gd && (gd != hwif->gd)) { |
gd | 3142 | drivers/block/ide.c | prev_gd = gd; |
gd | 3143 | drivers/block/ide.c | gd = gd->next; |
gd | 3145 | drivers/block/ide.c | if (gd != hwif->gd) |
gd | 3149 | drivers/block/ide.c | prev_gd->next = gd->next; |
gd | 3151 | drivers/block/ide.c | gendisk_head = gd->next; |
gd | 3152 | drivers/block/ide.c | kfree(gd->sizes); |
gd | 3153 | drivers/block/ide.c | kfree(gd->part); |
gd | 3154 | drivers/block/ide.c | kfree(gd); |
gd | 400 | drivers/block/ide.h | struct gendisk *gd; /* gendisk structure */ |