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