Commit 20389e3d authored by Christoph Hellwig's avatar Christoph Hellwig

[PATCH] devfs: s390

parent 2048d61c
......@@ -168,11 +168,9 @@ dasd_state_new_to_known(struct dasd_device *device)
snprintf(buf, sizeof(buf), "dasd/%04x/device",
_ccw_device_get_device_number(device->cdev));
device->devfs_entry = devfs_register(NULL, buf, 0,
major(kdev),
minor(kdev) << DASD_PARTN_BITS,
devfs_perm,
&dasd_device_operations, NULL);
devfs_register(NULL, buf, 0,
major(kdev), minor(kdev) << DASD_PARTN_BITS,
devfs_perm, &dasd_device_operations, NULL);
device->state = DASD_STATE_KNOWN;
return 0;
}
......@@ -184,8 +182,8 @@ static inline void
dasd_state_known_to_new(struct dasd_device * device)
{
/* Remove device entry and devfs directory. */
devfs_unregister(device->devfs_entry);
devfs_unregister(device->gdp->de);
devfs_remove("dasd/%04x/device",
_ccw_device_get_device_number(device->cdev));
/* Forget the discipline information. */
device->discipline = NULL;
......
......@@ -264,7 +264,6 @@ extern struct dasd_discipline dasd_diag_discipline;
struct dasd_device {
/* Block device stuff. */
struct gendisk *gdp;
devfs_handle_t devfs_entry;
request_queue_t *request_queue;
spinlock_t request_queue_lock;
unsigned long blocks; /* size of volume in blocks */
......
......@@ -34,10 +34,6 @@ static struct file_operations fs3270_fops = {
};
#ifdef CONFIG_DEVFS_FS
static devfs_handle_t fs3270_devfs_dir;
static devfs_handle_t fs3270_devfs_tub;
extern struct file_operations tty_fops;
void fs3270_devfs_register(tub_t *tubp)
{
char name[16];
......@@ -48,7 +44,7 @@ void fs3270_devfs_register(tub_t *tubp)
S_IFCHR | S_IRUSR | S_IWUSR, &fs3270_fops, NULL);
sprintf(name, "tty%.4x", tubp->devno);
tty_register_devfs_name(&tty3270_driver, 0, tubp->minor,
fs3270_devfs_dir, name);
NULL, name);
}
void fs3270_devfs_unregister(tub_t *tubp)
......@@ -72,13 +68,11 @@ fs3270_init(void)
IBM_FS3270_MAJOR, rc);
return -1;
}
#ifdef CONFIG_DEVFS_FS
fs3270_devfs_dir = devfs_mk_dir("3270");
fs3270_devfs_tub = devfs_register(NULL, "3270/tub", 0,
devfs_mk_dir("3270");
devfs_register(NULL, "3270/tub", 0,
IBM_FS3270_MAJOR, 0,
S_IFCHR | S_IRUGO | S_IWUGO,
&fs3270_fops, NULL);
#endif
fs3270_major = IBM_FS3270_MAJOR;
return 0;
}
......@@ -90,10 +84,8 @@ void
fs3270_fini(void)
{
if (fs3270_major != -1) {
#ifdef CONFIG_DEVFS_FS
devfs_unregister(fs3270_devfs_tub);
devfs_unregister(fs3270_devfs_dir);
#endif
devfs_remove("3270");
devfs_remove("3270/tub");
unregister_chrdev(fs3270_major, "fs3270");
fs3270_major = -1;
}
......
......@@ -338,7 +338,6 @@ extern int tty3270_proc_misc;
extern enum tubwhat tty3270_proc_what;
extern struct tty_driver tty3270_driver;
#ifdef CONFIG_DEVFS_FS
extern devfs_handle_t fs3270_devfs_dir;
extern void fs3270_devfs_register(tub_t *);
extern void fs3270_devfs_unregister(tub_t *);
#endif
......
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