tty drivers are using ->read_proc hook, but not ->write_proc.
Remove the latter, before anyone notices.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
drivers/char/tty_io.c | 1 -
drivers/s390/char/con3215.c | 2 +-
drivers/s390/char/tty3270.c | 2 +-
fs/proc/proc_tty.c | 5 +----
include/linux/tty_driver.h | 4 ----
5 files changed, 3 insertions(+), 11 deletions(-)
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -3983,7 +3983,6 @@ void tty_set_operations(struct tty_driver *driver,
driver->wait_until_sent = op->wait_until_sent;
driver->send_xchar = op->send_xchar;
driver->read_proc = op->read_proc;
- driver->write_proc = op->write_proc;
driver->tiocmget = op->tiocmget;
driver->tiocmset = op->tiocmset;
#ifdef CONFIG_CONSOLE_POLL
--- a/drivers/s390/char/con3215.c
+++ b/drivers/s390/char/con3215.c
@@ -1138,7 +1138,7 @@ tty3215_init(void)
/*
* Initialize the tty_driver structure
* Entries in tty3215_driver that are NOT initialized:
- * proc_entry, set_termios, flush_buffer, set_ldisc, write_proc
+ * proc_entry, set_termios, flush_buffer, set_ldisc
*/
driver->owner = THIS_MODULE;
--- a/drivers/s390/char/tty3270.c
+++ b/drivers/s390/char/tty3270.c
@@ -1780,7 +1780,7 @@ static int __init tty3270_init(void)
/*
* Initialize the tty_driver structure
* Entries in tty3270_driver that are NOT initialized:
- * proc_entry, set_termios, flush_buffer, set_ldisc, write_proc
+ * proc_entry, set_termios, flush_buffer, set_ldisc
*/
driver->owner = THIS_MODULE;
driver->driver_name = "ttyTUB";
--- a/fs/proc/proc_tty.c
+++ b/fs/proc/proc_tty.c
@@ -192,16 +192,13 @@ void proc_tty_register_driver(struct tty_driver *driver)
{
struct proc_dir_entry *ent;
- if ((!driver->read_proc && !driver->write_proc) ||
- !driver->driver_name ||
- driver->proc_entry)
+ if (!driver->read_proc || !driver->driver_name || driver->proc_entry)
return;
ent = create_proc_entry(driver->driver_name, 0, proc_tty_driver);
if (!ent)
return;
ent->read_proc = driver->read_proc;
- ent->write_proc = driver->write_proc;
ent->owner = driver->owner;
ent->data = driver;
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -153,8 +153,6 @@ struct tty_operations {
void (*send_xchar)(struct tty_struct *tty, char ch);
int (*read_proc)(char *page, char **start, off_t off,
int count, int *eof, void *data);
- int (*write_proc)(struct file *file, const char __user *buffer,
- unsigned long count, void *data);
int (*tiocmget)(struct tty_struct *tty, struct file *file);
int (*tiocmset)(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear);
@@ -221,8 +219,6 @@ struct tty_driver {
void (*send_xchar)(struct tty_struct *tty, char ch);
int (*read_proc)(char *page, char **start, off_t off,
int count, int *eof, void *data);
- int (*write_proc)(struct file *file, const char __user *buffer,
- unsigned long count, void *data);
int (*tiocmget)(struct tty_struct *tty, struct file *file);
int (*tiocmset)(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear);
--
1.5.3.7
--
| Greg KH | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 011/196] sysfs: Fix a copy-n-paste typo in comment |
| Greg KH | Re: Linux 2.6.25.10 |
| Sam Ravnborg | Re: [RFC/PATCH] Documentation of kernel messages |
git: | |
| Peter Stahlir | Git as a filesystem |
| Ken Pratt | Re: pack operation is thrashing my server |
| Andy Parkins | svn:externals using git submodules |
| Junio C Hamano | Re: [PATCH] Teach remote machinery about remotes.default config variable |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Mayuresh Kathe | Re: What is our ultimate goal?? |
| Richard Stallman | Real men don't attack straw men |
| L. V. Lammert | Re: How to find all package files |
| Natalie Protasevich | [BUG] New Kernel Bugs |
| Mark Lord | Re: 2.6.25-rc8: FTP transfer errors |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Vivek Dasmohapatra | 2.6.24 ipw2200 driver can't be reset after firmware explodes |
