tag | line | file | source code |
gd | 1797 | drivers/block/ide-cd.c | HWIF(drive)->gd->sizes[drive->select.b.unit << PARTN_BITS] |
gd | 523 | drivers/block/ide.c | static void ide_geninit (struct gendisk *gd) |
gd | 526 | drivers/block/ide.c | ide_hwif_t *hwif = gd->real_devices; |
gd | 528 | drivers/block/ide.c | for (unit = 0; unit < gd->nr_real; ++unit) { |
gd | 553 | drivers/block/ide.c | struct gendisk *gd, **gdp; |
gd | 563 | drivers/block/ide.c | gd = kmalloc (sizeof(struct gendisk), GFP_KERNEL); |
gd | 564 | drivers/block/ide.c | gd->sizes = kmalloc (minors * sizeof(int), GFP_KERNEL); |
gd | 565 | drivers/block/ide.c | gd->part = kmalloc (minors * sizeof(struct hd_struct), GFP_KERNEL); |
gd | 574 | drivers/block/ide.c | hwif->drives[unit].part = &gd->part[unit << PARTN_BITS]; |
gd | 576 | drivers/block/ide.c | gd->major = hwif->major; /* our major device number */ |
gd | 577 | drivers/block/ide.c | gd->major_name = IDE_MAJOR_NAME; /* treated special in genhd.c */ |
gd | 578 | drivers/block/ide.c | gd->minor_shift = PARTN_BITS; /* num bits for partitions */ |
gd | 579 | drivers/block/ide.c | gd->max_p = 1<<PARTN_BITS; /* 1 + max partitions / drive */ |
gd | 580 | drivers/block/ide.c | gd->max_nr = units; /* max num real drives */ |
gd | 581 | drivers/block/ide.c | gd->nr_real = units; /* current num real drives */ |
gd | 582 | drivers/block/ide.c | gd->init = ide_geninit; /* initialization function */ |
gd | 583 | drivers/block/ide.c | gd->real_devices= hwif; /* ptr to internal data */ |
gd | 584 | drivers/block/ide.c | gd->next = NULL; /* linked list of major devs */ |
gd | 587 | drivers/block/ide.c | hwif->gd = *gdp = gd; /* link onto tail of list */ |
gd | 1871 | drivers/block/ide.c | resetup_one_dev(HWIF(drive)->gd, drive->select.b.unit); |
gd | 3238 | drivers/block/ide.c | hwif->gd->real_devices = hwif->drives[0].name; |
gd | 3239 | drivers/block/ide.c | for (i = 0; i < hwif->gd->nr_real; i++) |
gd | 3250 | drivers/block/ide.c | struct gendisk *prev_gd, *gd; |
gd | 3301 | drivers/block/ide.c | gd = gendisk_head; prev_gd = NULL; |
gd | 3302 | drivers/block/ide.c | while (gd && (gd != hwif->gd)) { |
gd | 3303 | drivers/block/ide.c | prev_gd = gd; |
gd | 3304 | drivers/block/ide.c | gd = gd->next; |
gd | 3306 | drivers/block/ide.c | if (gd != hwif->gd) |
gd | 3310 | drivers/block/ide.c | prev_gd->next = gd->next; |
gd | 3312 | drivers/block/ide.c | gendisk_head = gd->next; |
gd | 3313 | drivers/block/ide.c | kfree(gd->sizes); |
gd | 3314 | drivers/block/ide.c | kfree(gd->part); |
gd | 3315 | drivers/block/ide.c | kfree(gd); |
gd | 411 | drivers/block/ide.h | struct gendisk *gd; /* gendisk structure */ |