Lines Matching defs:disk
61 struct gendisk *disk;
70 static struct mmc_blk_data *mmc_blk_get(struct gendisk *disk)
75 md = disk->private_data;
90 int devmaj = MAJOR(disk_devt(md->disk));
91 int devidx = MINOR(disk_devt(md->disk)) >> MMC_SHIFT;
94 devidx = md->disk->first_minor >> MMC_SHIFT;
100 put_disk(md->disk);
127 static int mmc_blk_release(struct gendisk *disk, fmode_t mode)
129 struct mmc_blk_data *md = disk->private_data;
581 md->disk = alloc_disk(1 << MMC_SHIFT);
582 if (md->disk == NULL) {
597 md->disk->major = MMC_BLOCK_MAJOR;
598 md->disk->first_minor = devidx << MMC_SHIFT;
599 md->disk->fops = &mmc_bdops;
600 md->disk->private_data = md;
601 md->disk->queue = md->queue.queue;
602 md->disk->driverfs_dev = &card->dev;
616 sprintf(md->disk->disk_name, "mmcblk%d", devidx);
625 set_capacity(md->disk, card->ext_csd.sectors);
631 set_capacity(md->disk,
637 put_disk(md->disk);
663 md->disk->disk_name, cmd.arg, err);
691 string_get_size((u64)get_capacity(md->disk) << 9, STRING_UNITS_2,
694 md->disk->disk_name, mmc_card_id(card), mmc_card_name(card),
698 add_disk(md->disk);
714 del_gendisk(md->disk);