Lines Matching refs:idkp
35 struct ide_disk_obj *idkp = NULL;
38 idkp = ide_drv_g(disk, ide_disk_obj);
39 if (idkp) {
40 if (ide_device_get(idkp->drive))
41 idkp = NULL;
43 get_device(&idkp->dev);
46 return idkp;
49 static void ide_disk_put(struct ide_disk_obj *idkp)
51 ide_drive_t *drive = idkp->drive;
54 put_device(&idkp->dev);
68 struct ide_disk_obj *idkp = drive->driver_data;
69 struct gendisk *g = idkp->disk;
71 ide_proc_unregister_driver(drive, idkp->driver);
72 device_del(&idkp->dev);
77 put_device(&idkp->dev);
83 struct ide_disk_obj *idkp = to_ide_drv(dev, ide_disk_obj);
84 ide_drive_t *drive = idkp->drive;
85 struct gendisk *g = idkp->disk;
91 kfree(idkp);
186 struct ide_disk_obj *idkp;
190 idkp = ide_disk_get(disk);
191 if (idkp == NULL)
194 drive = idkp->drive;
198 idkp->openers++;
200 if ((drive->dev_flags & IDE_DFLAG_REMOVABLE) && idkp->openers == 1) {
236 idkp->openers--;
237 ide_disk_put(idkp);
255 struct ide_disk_obj *idkp = ide_drv_g(disk, ide_disk_obj);
256 ide_drive_t *drive = idkp->drive;
261 if (idkp->openers == 1)
264 if ((drive->dev_flags & IDE_DFLAG_REMOVABLE) && idkp->openers == 1) {
269 idkp->openers--;
271 ide_disk_put(idkp);
279 struct ide_disk_obj *idkp = ide_drv_g(bdev->bd_disk, ide_disk_obj);
280 ide_drive_t *drive = idkp->drive;
290 struct ide_disk_obj *idkp = ide_drv_g(disk, ide_disk_obj);
291 ide_drive_t *drive = idkp->drive;
308 struct ide_disk_obj *idkp = ide_drv_g(disk, ide_disk_obj);
309 ide_drive_t *drive = idkp->drive;
318 struct ide_disk_obj *idkp = ide_drv_g(disk, ide_disk_obj);
319 ide_drive_t *drive = idkp->drive;
331 struct ide_disk_obj *idkp = ide_drv_g(bdev->bd_disk, ide_disk_obj);
332 ide_drive_t *drive = idkp->drive;
351 struct ide_disk_obj *idkp;
375 idkp = kzalloc(sizeof(*idkp), GFP_KERNEL);
376 if (!idkp) {
388 idkp->dev.parent = &drive->gendev;
389 idkp->dev.release = ide_disk_release;
390 dev_set_name(&idkp->dev, dev_name(&drive->gendev));
392 if (device_register(&idkp->dev))
395 idkp->drive = drive;
396 idkp->driver = &ide_gd_driver;
397 idkp->disk = g;
399 g->private_data = &idkp->driver;
401 drive->driver_data = idkp;
421 kfree(idkp);