diff options
-rw-r--r-- | drivers/isdn/capi/capi.c | 7 | ||||
-rw-r--r-- | fs/proc/proc_tty.c | 18 | ||||
-rw-r--r-- | include/linux/tty_driver.h | 2 | ||||
-rw-r--r-- | net/bluetooth/rfcomm/tty.c | 6 |
4 files changed, 4 insertions, 29 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index 3e468d2cf730..2d8352419c0d 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c | |||
@@ -1331,12 +1331,6 @@ static void capinc_tty_send_xchar(struct tty_struct *tty, char ch) | |||
1331 | #endif | 1331 | #endif |
1332 | } | 1332 | } |
1333 | 1333 | ||
1334 | static int capinc_tty_read_proc(char *page, char **start, off_t off, | ||
1335 | int count, int *eof, void *data) | ||
1336 | { | ||
1337 | return 0; | ||
1338 | } | ||
1339 | |||
1340 | static struct tty_driver *capinc_tty_driver; | 1334 | static struct tty_driver *capinc_tty_driver; |
1341 | 1335 | ||
1342 | static const struct tty_operations capinc_ops = { | 1336 | static const struct tty_operations capinc_ops = { |
@@ -1358,7 +1352,6 @@ static const struct tty_operations capinc_ops = { | |||
1358 | .flush_buffer = capinc_tty_flush_buffer, | 1352 | .flush_buffer = capinc_tty_flush_buffer, |
1359 | .set_ldisc = capinc_tty_set_ldisc, | 1353 | .set_ldisc = capinc_tty_set_ldisc, |
1360 | .send_xchar = capinc_tty_send_xchar, | 1354 | .send_xchar = capinc_tty_send_xchar, |
1361 | .read_proc = capinc_tty_read_proc, | ||
1362 | }; | 1355 | }; |
1363 | 1356 | ||
1364 | static int capinc_tty_init(void) | 1357 | static int capinc_tty_init(void) |
diff --git a/fs/proc/proc_tty.c b/fs/proc/proc_tty.c index 854827b1d463..83adcc869437 100644 --- a/fs/proc/proc_tty.c +++ b/fs/proc/proc_tty.c | |||
@@ -144,22 +144,12 @@ void proc_tty_register_driver(struct tty_driver *driver) | |||
144 | { | 144 | { |
145 | struct proc_dir_entry *ent; | 145 | struct proc_dir_entry *ent; |
146 | 146 | ||
147 | if (!driver->driver_name || driver->proc_entry) | 147 | if (!driver->driver_name || driver->proc_entry || |
148 | !driver->ops->proc_fops) | ||
148 | return; | 149 | return; |
149 | 150 | ||
150 | if (driver->ops->proc_fops) { | 151 | ent = proc_create_data(driver->driver_name, 0, proc_tty_driver, |
151 | ent = proc_create_data(driver->driver_name, 0, proc_tty_driver, | 152 | driver->ops->proc_fops, driver); |
152 | driver->ops->proc_fops, driver); | ||
153 | if (!ent) | ||
154 | return; | ||
155 | } else if (driver->ops->read_proc) { | ||
156 | ent = create_proc_entry(driver->driver_name, 0, proc_tty_driver); | ||
157 | if (!ent) | ||
158 | return; | ||
159 | ent->read_proc = driver->ops->read_proc; | ||
160 | ent->data = driver; | ||
161 | } else | ||
162 | return; | ||
163 | driver->proc_entry = ent; | 153 | driver->proc_entry = ent; |
164 | } | 154 | } |
165 | 155 | ||
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index c9a69575ded6..8615d661ab60 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h | |||
@@ -252,8 +252,6 @@ struct tty_operations { | |||
252 | void (*set_ldisc)(struct tty_struct *tty); | 252 | void (*set_ldisc)(struct tty_struct *tty); |
253 | void (*wait_until_sent)(struct tty_struct *tty, int timeout); | 253 | void (*wait_until_sent)(struct tty_struct *tty, int timeout); |
254 | void (*send_xchar)(struct tty_struct *tty, char ch); | 254 | void (*send_xchar)(struct tty_struct *tty, char ch); |
255 | int (*read_proc)(char *page, char **start, off_t off, | ||
256 | int count, int *eof, void *data); | ||
257 | int (*tiocmget)(struct tty_struct *tty, struct file *file); | 255 | int (*tiocmget)(struct tty_struct *tty, struct file *file); |
258 | int (*tiocmset)(struct tty_struct *tty, struct file *file, | 256 | int (*tiocmset)(struct tty_struct *tty, struct file *file, |
259 | unsigned int set, unsigned int clear); | 257 | unsigned int set, unsigned int clear); |
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c index abdc703a11d2..cab71ea2796d 100644 --- a/net/bluetooth/rfcomm/tty.c +++ b/net/bluetooth/rfcomm/tty.c | |||
@@ -1093,11 +1093,6 @@ static void rfcomm_tty_hangup(struct tty_struct *tty) | |||
1093 | } | 1093 | } |
1094 | } | 1094 | } |
1095 | 1095 | ||
1096 | static int rfcomm_tty_read_proc(char *buf, char **start, off_t offset, int len, int *eof, void *unused) | ||
1097 | { | ||
1098 | return 0; | ||
1099 | } | ||
1100 | |||
1101 | static int rfcomm_tty_tiocmget(struct tty_struct *tty, struct file *filp) | 1096 | static int rfcomm_tty_tiocmget(struct tty_struct *tty, struct file *filp) |
1102 | { | 1097 | { |
1103 | struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data; | 1098 | struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data; |
@@ -1156,7 +1151,6 @@ static const struct tty_operations rfcomm_ops = { | |||
1156 | .send_xchar = rfcomm_tty_send_xchar, | 1151 | .send_xchar = rfcomm_tty_send_xchar, |
1157 | .hangup = rfcomm_tty_hangup, | 1152 | .hangup = rfcomm_tty_hangup, |
1158 | .wait_until_sent = rfcomm_tty_wait_until_sent, | 1153 | .wait_until_sent = rfcomm_tty_wait_until_sent, |
1159 | .read_proc = rfcomm_tty_read_proc, | ||
1160 | .tiocmget = rfcomm_tty_tiocmget, | 1154 | .tiocmget = rfcomm_tty_tiocmget, |
1161 | .tiocmset = rfcomm_tty_tiocmset, | 1155 | .tiocmset = rfcomm_tty_tiocmset, |
1162 | }; | 1156 | }; |