Lines Matching refs:gendisk
129 struct scm_device *scmdev = bdev->gendisk->private_data;
392 bdev->gendisk = alloc_disk(SCM_NR_PARTS);
393 if (!bdev->gendisk)
397 bdev->gendisk->driverfs_dev = &scmdev->dev;
398 bdev->gendisk->private_data = scmdev;
399 bdev->gendisk->fops = &scm_blk_devops;
400 bdev->gendisk->queue = rq;
401 bdev->gendisk->major = scm_major;
402 bdev->gendisk->first_minor = devindex * SCM_NR_PARTS;
404 len = snprintf(bdev->gendisk->disk_name, DISK_NAME_LEN, "scm");
406 len += snprintf(bdev->gendisk->disk_name + len,
411 snprintf(bdev->gendisk->disk_name + len, DISK_NAME_LEN - len, "%c",
415 set_capacity(bdev->gendisk, scmdev->size >> 9);
416 add_disk(bdev->gendisk);
429 del_gendisk(bdev->gendisk);
430 blk_cleanup_queue(bdev->gendisk->queue);
431 put_disk(bdev->gendisk);