summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAlexander Viro <viro@math.psu.edu>2002-09-21 02:42:25 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-09-21 02:42:25 -0700
commit16a974dc82a111c05b558ab945589ff536c7c0f2 (patch)
tree1ab9716779d08e2f4d6f302dced41852595394aa /include/linux
parentb39472ce4dbacc5c38d4e7103440c5c2d770e7e1 (diff)
[PATCH] devfs handling for cdroms moved to register_disk()
devfs-related stuff moved from cdrom.c and cdrom drivers to register_disk(); new flag (GENHD_FL_CD) marks gendisks that need such treatment.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/cdrom.h14
-rw-r--r--include/linux/genhd.h1
2 files changed, 1 insertions, 14 deletions
diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h
index 19a318fe8ce6..b287b7a24b11 100644
--- a/include/linux/cdrom.h
+++ b/include/linux/cdrom.h
@@ -730,9 +730,7 @@ 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 */
- devfs_handle_t de; /* real driver should create this */
struct device cdrom_driverfs_dev; /* driverfs implementation */
- int number; /* generic driver updates this */
/* specifications */
kdev_t dev; /* device number */
int mask; /* mask of capability: disables them */
@@ -787,18 +785,6 @@ extern int cdrom_media_changed(kdev_t);
extern int register_cdrom(struct cdrom_device_info *cdi);
extern int unregister_cdrom(struct cdrom_device_info *cdi);
-static inline void devfs_plain_cdrom(struct cdrom_device_info *cdi,
- struct block_device_operations *ops)
-{
- char vname[23];
-
- sprintf (vname, "cdroms/cdrom%d", cdi->number);
- cdi->de = devfs_register (NULL, vname, DEVFS_FL_DEFAULT,
- major(cdi->dev), minor(cdi->dev),
- S_IFBLK | S_IRUGO | S_IWUGO,
- ops, NULL);
-}
-
typedef struct {
int data;
int audio;
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index ecd747fbe569..8406d1aeaede 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -68,6 +68,7 @@ struct hd_struct {
#define GENHD_FL_REMOVABLE 1
#define GENHD_FL_DRIVERFS 2
#define GENHD_FL_DEVFS 4
+#define GENHD_FL_CD 8
struct gendisk {
int major; /* major number of driver */