Commit a48966ab authored by Christoph Hellwig's avatar Christoph Hellwig

[PATCH] devfs: remove dead devfs code in dasd

Dasd is partitioned - all devfs stuff is handled by the gendisk layer.
parent 4ad2c922
...@@ -141,36 +141,15 @@ dasd_free_device(struct dasd_device *device) ...@@ -141,36 +141,15 @@ dasd_free_device(struct dasd_device *device)
static inline int static inline int
dasd_state_new_to_known(struct dasd_device *device) dasd_state_new_to_known(struct dasd_device *device)
{ {
umode_t devfs_perm;
kdev_t kdev;
char buf[20];
kdev = dasd_get_kdev(device);
if (kdev_none(kdev))
return -ENODEV;
/* /*
* As long as the device is not in state DASD_STATE_NEW we want to * As long as the device is not in state DASD_STATE_NEW we want to
* keep the reference count > 0. * keep the reference count > 0.
*/ */
dasd_get_device(device); dasd_get_device(device);
#ifdef CONFIG_DEVFS_FS
/* Add a proc directory and the dasd device entry to devfs. */
sprintf(device->gdp->devfs_name, "dasd/%04x", sprintf(device->gdp->devfs_name, "dasd/%04x",
_ccw_device_get_device_number(device->cdev)); _ccw_device_get_device_number(device->cdev));
#endif
if (device->ro_flag)
devfs_perm = S_IFBLK | S_IRUSR;
else
devfs_perm = S_IFBLK | S_IRUSR | S_IWUSR;
snprintf(buf, sizeof(buf), "dasd/%04x/device",
_ccw_device_get_device_number(device->cdev));
devfs_register(NULL, buf, 0,
major(kdev), minor(kdev) << DASD_PARTN_BITS,
devfs_perm, &dasd_device_operations, NULL);
device->state = DASD_STATE_KNOWN; device->state = DASD_STATE_KNOWN;
return 0; return 0;
} }
...@@ -181,10 +160,6 @@ dasd_state_new_to_known(struct dasd_device *device) ...@@ -181,10 +160,6 @@ dasd_state_new_to_known(struct dasd_device *device)
static inline void static inline void
dasd_state_known_to_new(struct dasd_device * device) dasd_state_known_to_new(struct dasd_device * device)
{ {
/* Remove device entry and devfs directory. */
devfs_remove("dasd/%04x/device",
_ccw_device_get_device_number(device->cdev));
/* Forget the discipline information. */ /* Forget the discipline information. */
device->discipline = NULL; device->discipline = NULL;
device->state = DASD_STATE_NEW; device->state = DASD_STATE_NEW;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment