LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] tty: remove ->write_proc hooks
@ 2008-04-12 21:04 Alexey Dobriyan
2008-04-12 21:23 ` Alan Cox
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2008-04-12 21:04 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel, alan
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] tty: remove ->write_proc hooks
2008-04-12 21:04 [PATCH] tty: remove ->write_proc hooks Alexey Dobriyan
@ 2008-04-12 21:23 ` Alan Cox
0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2008-04-12 21:23 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: akpm, linux-kernel
On Sun, 13 Apr 2008 01:04:52 +0400
Alexey Dobriyan <adobriyan@gmail.com> wrote:
> 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>
Andrew - please don't apply this for the moment as tty_set_operations and
per driver operations copies are going away. I'll merge an equivalent
tty->ops based patch into my tree.
Alan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-12 21:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-12 21:04 [PATCH] tty: remove ->write_proc hooks Alexey Dobriyan
2008-04-12 21:23 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).