tty: replace ->proc_fops with ->proc_show

Just set up the show callback in the tty_operations, and use
proc_create_single_data to create the file without additional
boilerplace code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Christoph Hellwig
2018-04-13 21:04:45 +02:00
부모 ec7d9c9ce8
커밋 8a8dcabffb
14개의 변경된 파일16개의 추가작업 그리고 172개의 파일을 삭제

파일 보기

@@ -135,11 +135,11 @@ void proc_tty_register_driver(struct tty_driver *driver)
struct proc_dir_entry *ent;
if (!driver->driver_name || driver->proc_entry ||
!driver->ops->proc_fops)
!driver->ops->proc_show)
return;
ent = proc_create_data(driver->driver_name, 0, proc_tty_driver,
driver->ops->proc_fops, driver);
ent = proc_create_single_data(driver->driver_name, 0, proc_tty_driver,
driver->ops->proc_show, driver);
driver->proc_entry = ent;
}