aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/proc_tty.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/proc/proc_tty.c b/fs/proc/proc_tty.c
index 4a9e0f65ae60..83adcc869437 100644
--- a/fs/proc/proc_tty.c
+++ b/fs/proc/proc_tty.c
@@ -144,16 +144,12 @@ void proc_tty_register_driver(struct tty_driver *driver)
144{ 144{
145 struct proc_dir_entry *ent; 145 struct proc_dir_entry *ent;
146 146
147 if (!driver->ops->read_proc || !driver->driver_name || 147 if (!driver->driver_name || driver->proc_entry ||
148 driver->proc_entry) 148 !driver->ops->proc_fops)
149 return; 149 return;
150 150
151 ent = create_proc_entry(driver->driver_name, 0, proc_tty_driver); 151 ent = proc_create_data(driver->driver_name, 0, proc_tty_driver,
152 if (!ent) 152 driver->ops->proc_fops, driver);
153 return;
154 ent->read_proc = driver->ops->read_proc;
155 ent->data = driver;
156
157 driver->proc_entry = ent; 153 driver->proc_entry = ent;
158} 154}
159 155