proc tty: remove struct tty_operations::read_proc
struct tty_operations::proc_fops took it's place and there is one less create_proc_read_entry() user now! Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
140716934f
commit
0f043a81eb
@@ -144,22 +144,12 @@ void proc_tty_register_driver(struct tty_driver *driver)
|
||||
{
|
||||
struct proc_dir_entry *ent;
|
||||
|
||||
if (!driver->driver_name || driver->proc_entry)
|
||||
if (!driver->driver_name || driver->proc_entry ||
|
||||
!driver->ops->proc_fops)
|
||||
return;
|
||||
|
||||
if (driver->ops->proc_fops) {
|
||||
ent = proc_create_data(driver->driver_name, 0, proc_tty_driver,
|
||||
driver->ops->proc_fops, driver);
|
||||
if (!ent)
|
||||
return;
|
||||
} else if (driver->ops->read_proc) {
|
||||
ent = create_proc_entry(driver->driver_name, 0, proc_tty_driver);
|
||||
if (!ent)
|
||||
return;
|
||||
ent->read_proc = driver->ops->read_proc;
|
||||
ent->data = driver;
|
||||
} else
|
||||
return;
|
||||
ent = proc_create_data(driver->driver_name, 0, proc_tty_driver,
|
||||
driver->ops->proc_fops, driver);
|
||||
driver->proc_entry = ent;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user