From 47b9a4852cf6f3efb9d4f84c6f098a963a7f6908 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Tue, 31 Mar 2009 15:19:25 -0700 Subject: [PATCH] --- yaml --- r: 139135 b: refs/heads/master c: 0f043a81ebe84be3576667f04fdda481609e3816 h: refs/heads/master i: 139133: 06a7d3f4bf2d1dde0ed1a6fa350dae1f9b6fd3f9 139131: 3621fd76365ef7193e41094e99555a541eecea8c 139127: 3c3c47b1a77c70fc61dd8486b582ea2b990126ed 139119: bd2747897d541a29a7015707bf28651b8ff055b2 139103: 8db4e371c276cbfdac801d46636981b7d63d8d01 139071: 76b02535a2b817eff6fa34ce9951ff6730c3c82e 139007: 588d1b5e3b7f7665278e8b0808a5485b440d2878 v: v3 --- [refs] | 2 +- trunk/drivers/isdn/capi/capi.c | 7 ------- trunk/fs/proc/proc_tty.c | 18 ++++-------------- trunk/include/linux/tty_driver.h | 2 -- trunk/net/bluetooth/rfcomm/tty.c | 6 ------ 5 files changed, 5 insertions(+), 30 deletions(-) diff --git a/[refs] b/[refs] index e2c3e4160c51..b612bd962f53 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 140716934f67a9b28c3f7032c07c20c746d97a31 +refs/heads/master: 0f043a81ebe84be3576667f04fdda481609e3816 diff --git a/trunk/drivers/isdn/capi/capi.c b/trunk/drivers/isdn/capi/capi.c index 3e468d2cf730..2d8352419c0d 100644 --- a/trunk/drivers/isdn/capi/capi.c +++ b/trunk/drivers/isdn/capi/capi.c @@ -1331,12 +1331,6 @@ static void capinc_tty_send_xchar(struct tty_struct *tty, char ch) #endif } -static int capinc_tty_read_proc(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - return 0; -} - static struct tty_driver *capinc_tty_driver; static const struct tty_operations capinc_ops = { @@ -1358,7 +1352,6 @@ static const struct tty_operations capinc_ops = { .flush_buffer = capinc_tty_flush_buffer, .set_ldisc = capinc_tty_set_ldisc, .send_xchar = capinc_tty_send_xchar, - .read_proc = capinc_tty_read_proc, }; static int capinc_tty_init(void) diff --git a/trunk/fs/proc/proc_tty.c b/trunk/fs/proc/proc_tty.c index 854827b1d463..83adcc869437 100644 --- a/trunk/fs/proc/proc_tty.c +++ b/trunk/fs/proc/proc_tty.c @@ -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; } diff --git a/trunk/include/linux/tty_driver.h b/trunk/include/linux/tty_driver.h index c9a69575ded6..8615d661ab60 100644 --- a/trunk/include/linux/tty_driver.h +++ b/trunk/include/linux/tty_driver.h @@ -252,8 +252,6 @@ struct tty_operations { void (*set_ldisc)(struct tty_struct *tty); void (*wait_until_sent)(struct tty_struct *tty, int timeout); 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 (*tiocmget)(struct tty_struct *tty, struct file *file); int (*tiocmset)(struct tty_struct *tty, struct file *file, unsigned int set, unsigned int clear); diff --git a/trunk/net/bluetooth/rfcomm/tty.c b/trunk/net/bluetooth/rfcomm/tty.c index abdc703a11d2..cab71ea2796d 100644 --- a/trunk/net/bluetooth/rfcomm/tty.c +++ b/trunk/net/bluetooth/rfcomm/tty.c @@ -1093,11 +1093,6 @@ static void rfcomm_tty_hangup(struct tty_struct *tty) } } -static int rfcomm_tty_read_proc(char *buf, char **start, off_t offset, int len, int *eof, void *unused) -{ - return 0; -} - static int rfcomm_tty_tiocmget(struct tty_struct *tty, struct file *filp) { struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data; @@ -1156,7 +1151,6 @@ static const struct tty_operations rfcomm_ops = { .send_xchar = rfcomm_tty_send_xchar, .hangup = rfcomm_tty_hangup, .wait_until_sent = rfcomm_tty_wait_until_sent, - .read_proc = rfcomm_tty_read_proc, .tiocmget = rfcomm_tty_tiocmget, .tiocmset = rfcomm_tty_tiocmset, };