Lines Matching refs:disk
251 static int floppy_open(struct gendisk *disk, blk_mode_t mode);
252 static unsigned int floppy_check_events(struct gendisk *disk,
254 static int floppy_revalidate(struct gendisk *disk);
926 static int floppy_open(struct gendisk *disk, blk_mode_t mode) in floppy_open() argument
928 struct floppy_state *fs = disk->private_data; in floppy_open()
966 if (disk_check_media_change(disk)) in floppy_open()
967 floppy_revalidate(disk); in floppy_open()
996 static int floppy_unlocked_open(struct gendisk *disk, blk_mode_t mode) in floppy_unlocked_open() argument
1001 ret = floppy_open(disk, mode); in floppy_unlocked_open()
1007 static void floppy_release(struct gendisk *disk) in floppy_release() argument
1009 struct floppy_state *fs = disk->private_data; in floppy_release()
1025 static unsigned int floppy_check_events(struct gendisk *disk, in floppy_check_events() argument
1028 struct floppy_state *fs = disk->private_data; in floppy_check_events()
1032 static int floppy_revalidate(struct gendisk *disk) in floppy_revalidate() argument
1034 struct floppy_state *fs = disk->private_data; in floppy_revalidate()
1197 struct gendisk *disk; in swim3_attach() local
1216 disk = blk_mq_alloc_disk(&fs->tag_set, &lim, fs); in swim3_attach()
1217 if (IS_ERR(disk)) { in swim3_attach()
1218 rc = PTR_ERR(disk); in swim3_attach()
1226 disk->major = FLOPPY_MAJOR; in swim3_attach()
1227 disk->first_minor = floppy_count; in swim3_attach()
1228 disk->minors = 1; in swim3_attach()
1229 disk->fops = &floppy_fops; in swim3_attach()
1230 disk->private_data = fs; in swim3_attach()
1231 disk->events = DISK_EVENT_MEDIA_CHANGE; in swim3_attach()
1232 disk->flags |= GENHD_FL_REMOVABLE | GENHD_FL_NO_PART; in swim3_attach()
1233 sprintf(disk->disk_name, "fd%d", floppy_count); in swim3_attach()
1234 set_capacity(disk, 2880); in swim3_attach()
1235 rc = add_disk(disk); in swim3_attach()
1239 disks[floppy_count++] = disk; in swim3_attach()
1243 put_disk(disk); in swim3_attach()