tty: Remove tty_pair_get_tty()/tty_pair_get_pty() api
tty_pair_get_pty() has no in-tree users and tty_pair_get_tty() has only one file-local user. Remove the external declarations, the export declarations, and declare tty_pair_get_tty() static. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Reviewed-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
		
					parent
					
						
							
								edf4edacb3
							
						
					
				
			
			
				commit
				
					
						8f166e0019
					
				
			
		
					 2 changed files with 5 additions and 14 deletions
				
			
		| 
						 | 
					@ -2703,23 +2703,17 @@ static int tty_tiocgicount(struct tty_struct *tty, void __user *arg)
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct tty_struct *tty_pair_get_tty(struct tty_struct *tty)
 | 
					/*
 | 
				
			||||||
 | 
					 * if pty, return the slave side (real_tty)
 | 
				
			||||||
 | 
					 * otherwise, return self
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					static struct tty_struct *tty_pair_get_tty(struct tty_struct *tty)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
 | 
						if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
 | 
				
			||||||
	    tty->driver->subtype == PTY_TYPE_MASTER)
 | 
						    tty->driver->subtype == PTY_TYPE_MASTER)
 | 
				
			||||||
		tty = tty->link;
 | 
							tty = tty->link;
 | 
				
			||||||
	return tty;
 | 
						return tty;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
EXPORT_SYMBOL(tty_pair_get_tty);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
struct tty_struct *tty_pair_get_pty(struct tty_struct *tty)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
 | 
					 | 
				
			||||||
	    tty->driver->subtype == PTY_TYPE_MASTER)
 | 
					 | 
				
			||||||
	    return tty;
 | 
					 | 
				
			||||||
	return tty->link;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
EXPORT_SYMBOL(tty_pair_get_pty);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Split this up, as gcc can choke on it otherwise..
 | 
					 * Split this up, as gcc can choke on it otherwise..
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -498,9 +498,6 @@ extern int tty_init_termios(struct tty_struct *tty);
 | 
				
			||||||
extern int tty_standard_install(struct tty_driver *driver,
 | 
					extern int tty_standard_install(struct tty_driver *driver,
 | 
				
			||||||
		struct tty_struct *tty);
 | 
							struct tty_struct *tty);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern struct tty_struct *tty_pair_get_tty(struct tty_struct *tty);
 | 
					 | 
				
			||||||
extern struct tty_struct *tty_pair_get_pty(struct tty_struct *tty);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
extern struct mutex tty_mutex;
 | 
					extern struct mutex tty_mutex;
 | 
				
			||||||
extern spinlock_t tty_files_lock;
 | 
					extern spinlock_t tty_files_lock;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue