mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
proc tty: remove struct tty_operations::read_proc
struct tty_operations::proc_fops took it's place and there is one less create_proc_read_entry() user now! Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
140716934f
commit
0f043a81eb
4 changed files with 4 additions and 29 deletions
|
@ -1331,12 +1331,6 @@ static void capinc_tty_send_xchar(struct tty_struct *tty, char ch)
|
||||||
#endif
|
#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 struct tty_driver *capinc_tty_driver;
|
||||||
|
|
||||||
static const struct tty_operations capinc_ops = {
|
static const struct tty_operations capinc_ops = {
|
||||||
|
@ -1358,7 +1352,6 @@ static const struct tty_operations capinc_ops = {
|
||||||
.flush_buffer = capinc_tty_flush_buffer,
|
.flush_buffer = capinc_tty_flush_buffer,
|
||||||
.set_ldisc = capinc_tty_set_ldisc,
|
.set_ldisc = capinc_tty_set_ldisc,
|
||||||
.send_xchar = capinc_tty_send_xchar,
|
.send_xchar = capinc_tty_send_xchar,
|
||||||
.read_proc = capinc_tty_read_proc,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static int capinc_tty_init(void)
|
static int capinc_tty_init(void)
|
||||||
|
|
|
@ -144,22 +144,12 @@ void proc_tty_register_driver(struct tty_driver *driver)
|
||||||
{
|
{
|
||||||
struct proc_dir_entry *ent;
|
struct proc_dir_entry *ent;
|
||||||
|
|
||||||
if (!driver->driver_name || driver->proc_entry)
|
if (!driver->driver_name || driver->proc_entry ||
|
||||||
|
!driver->ops->proc_fops)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (driver->ops->proc_fops) {
|
ent = proc_create_data(driver->driver_name, 0, proc_tty_driver,
|
||||||
ent = proc_create_data(driver->driver_name, 0, proc_tty_driver,
|
driver->ops->proc_fops, 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;
|
|
||||||
driver->proc_entry = ent;
|
driver->proc_entry = ent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -252,8 +252,6 @@ struct tty_operations {
|
||||||
void (*set_ldisc)(struct tty_struct *tty);
|
void (*set_ldisc)(struct tty_struct *tty);
|
||||||
void (*wait_until_sent)(struct tty_struct *tty, int timeout);
|
void (*wait_until_sent)(struct tty_struct *tty, int timeout);
|
||||||
void (*send_xchar)(struct tty_struct *tty, char ch);
|
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 (*tiocmget)(struct tty_struct *tty, struct file *file);
|
||||||
int (*tiocmset)(struct tty_struct *tty, struct file *file,
|
int (*tiocmset)(struct tty_struct *tty, struct file *file,
|
||||||
unsigned int set, unsigned int clear);
|
unsigned int set, unsigned int clear);
|
||||||
|
|
|
@ -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)
|
static int rfcomm_tty_tiocmget(struct tty_struct *tty, struct file *filp)
|
||||||
{
|
{
|
||||||
struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data;
|
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,
|
.send_xchar = rfcomm_tty_send_xchar,
|
||||||
.hangup = rfcomm_tty_hangup,
|
.hangup = rfcomm_tty_hangup,
|
||||||
.wait_until_sent = rfcomm_tty_wait_until_sent,
|
.wait_until_sent = rfcomm_tty_wait_until_sent,
|
||||||
.read_proc = rfcomm_tty_read_proc,
|
|
||||||
.tiocmget = rfcomm_tty_tiocmget,
|
.tiocmget = rfcomm_tty_tiocmget,
|
||||||
.tiocmset = rfcomm_tty_tiocmset,
|
.tiocmset = rfcomm_tty_tiocmset,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue