Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 60b33c13 authored by Alan Cox's avatar Alan Cox Committed by Greg Kroah-Hartman
Browse files

tiocmget: kill off the passing of the struct file



We don't actually need this and it causes problems for internal use of
this functionality. Currently there is a single use of the FILE * pointer.
That is the serial core which uses it to check tty_hung_up_p. However if
that is true then IO_ERROR is also already set so the check may be removed.

Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent adf9251f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1194,7 +1194,7 @@ static int get_lsr_info(struct async_struct * info, unsigned int __user *value)
}
}




static int rs_tiocmget(struct tty_struct *tty, struct file *file)
static int rs_tiocmget(struct tty_struct *tty)
{
{
	struct async_struct * info = tty->driver_data;
	struct async_struct * info = tty->driver_data;
	unsigned char control, status;
	unsigned char control, status;
+1 −1
Original line number Original line Diff line number Diff line
@@ -2429,7 +2429,7 @@ static int get_lsr_info(struct cyclades_port *info, unsigned int __user *value)
	return put_user(result, (unsigned long __user *)value);
	return put_user(result, (unsigned long __user *)value);
}
}


static int cy_tiocmget(struct tty_struct *tty, struct file *file)
static int cy_tiocmget(struct tty_struct *tty)
{
{
	struct cyclades_port *info = tty->driver_data;
	struct cyclades_port *info = tty->driver_data;
	struct cyclades_card *card;
	struct cyclades_card *card;
+2 −2
Original line number Original line Diff line number Diff line
@@ -1982,7 +1982,7 @@ static int info_ioctl(struct tty_struct *tty, struct file *file,
	return 0;
	return 0;
}
}


static int pc_tiocmget(struct tty_struct *tty, struct file *file)
static int pc_tiocmget(struct tty_struct *tty)
{
{
	struct channel *ch = tty->driver_data;
	struct channel *ch = tty->driver_data;
	struct board_chan __iomem *bc;
	struct board_chan __iomem *bc;
@@ -2074,7 +2074,7 @@ static int pc_ioctl(struct tty_struct *tty, struct file *file,
		return -EINVAL;
		return -EINVAL;
	switch (cmd) {
	switch (cmd) {
	case TIOCMODG:
	case TIOCMODG:
		mflag = pc_tiocmget(tty, file);
		mflag = pc_tiocmget(tty);
		if (put_user(mflag, (unsigned long __user *)argp))
		if (put_user(mflag, (unsigned long __user *)argp))
			return -EFAULT;
			return -EFAULT;
		break;
		break;
+2 −2
Original line number Original line Diff line number Diff line
@@ -181,7 +181,7 @@ static void ip2_unthrottle(PTTY);
static void ip2_stop(PTTY);
static void ip2_stop(PTTY);
static void ip2_start(PTTY);
static void ip2_start(PTTY);
static void ip2_hangup(PTTY);
static void ip2_hangup(PTTY);
static int  ip2_tiocmget(struct tty_struct *tty, struct file *file);
static int  ip2_tiocmget(struct tty_struct *tty);
static int  ip2_tiocmset(struct tty_struct *tty, struct file *file,
static int  ip2_tiocmset(struct tty_struct *tty, struct file *file,
			 unsigned int set, unsigned int clear);
			 unsigned int set, unsigned int clear);
static int ip2_get_icount(struct tty_struct *tty,
static int ip2_get_icount(struct tty_struct *tty,
@@ -2038,7 +2038,7 @@ ip2_stop ( PTTY tty )
/* Device Ioctl Section                                                       */
/* Device Ioctl Section                                                       */
/******************************************************************************/
/******************************************************************************/


static int ip2_tiocmget(struct tty_struct *tty, struct file *file)
static int ip2_tiocmget(struct tty_struct *tty)
{
{
	i2ChanStrPtr pCh = DevTable[tty->index];
	i2ChanStrPtr pCh = DevTable[tty->index];
#ifdef	ENABLE_DSSNOW
#ifdef	ENABLE_DSSNOW
+1 −1
Original line number Original line Diff line number Diff line
@@ -1065,7 +1065,7 @@ static int isicom_send_break(struct tty_struct *tty, int length)
	return 0;
	return 0;
}
}


static int isicom_tiocmget(struct tty_struct *tty, struct file *file)
static int isicom_tiocmget(struct tty_struct *tty)
{
{
	struct isi_port *port = tty->driver_data;
	struct isi_port *port = tty->driver_data;
	/* just send the port status */
	/* just send the port status */
Loading