From b288f6add39cf474fc2ec8087d32d3e1d4c1c6d0 Mon Sep 17 00:00:00 2001 From: Alexander Viro Date: Tue, 15 Oct 2002 04:25:24 -0700 Subject: [PATCH] preparation to use of driverfs refcounts, part 2 - disk * disk->disk_dev is initialized in alloc_disk(), device_add()'d in add_disk(), device_del()'d in unregister_disk() and device_put() in put_disk(). * devices of partitions are made its children. * attributes of disk one: dev (dev_t of the thing), range (number of minors) and size (in sectors). * attributes of partition ones: dev (ditto), start (in sectors) and size (in sectors). * disk devices are put on a new bus - "block" * if caller of add_disk() had set disk->driverfs_dev, we set symlinks: "device" from disk to underlying device and "block" from underlying device to disk. * ->release() of disk_dev frees disk and disk->part. At that point we have sane driverfs subtree for each gendisk and refcount of its root (disk->disk_dev) can act as gendisk refcount. --- include/linux/cdrom.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h index b287b7a24b11..4387203c95b7 100644 --- a/include/linux/cdrom.h +++ b/include/linux/cdrom.h @@ -730,7 +730,6 @@ struct cdrom_device_info { struct cdrom_device_ops *ops; /* link to device_ops */ struct cdrom_device_info *next; /* next device_info for this major */ void *handle; /* driver-dependent data */ - struct device cdrom_driverfs_dev; /* driverfs implementation */ /* specifications */ kdev_t dev; /* device number */ int mask; /* mask of capability: disables them */ -- cgit v1.2.3