summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serdev
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2019-01-30 10:52:03 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-30 11:48:08 +0100
commit3c635e4f14482bc11e25461892f3ae193e5266f8 (patch)
tree09a1c705927b3cca082794565592213693a750f4 /drivers/tty/serdev
parent2d908b38d40921a03225d42fd6e48eb51bffd606 (diff)
downloadlinux-3c635e4f14482bc11e25461892f3ae193e5266f8.tar.bz2
serdev: ttyport: call tiocmget and tiocmset ops directly
The tty struct holds a pointer to the driver's tty operations so drop the unnecessary driver dereference when calling tiocmget and tiocmset. Note that this also makes the calls match the preceding sanity checks as expected. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serdev')
-rw-r--r--drivers/tty/serdev/serdev-ttyport.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serdev/serdev-ttyport.c b/drivers/tty/serdev/serdev-ttyport.c
index fa1672993b4c..d1cdd2ab8b4c 100644
--- a/drivers/tty/serdev/serdev-ttyport.c
+++ b/drivers/tty/serdev/serdev-ttyport.c
@@ -233,7 +233,7 @@ static int ttyport_get_tiocm(struct serdev_controller *ctrl)
if (!tty->ops->tiocmget)
return -ENOTSUPP;
- return tty->driver->ops->tiocmget(tty);
+ return tty->ops->tiocmget(tty);
}
static int ttyport_set_tiocm(struct serdev_controller *ctrl, unsigned int set, unsigned int clear)
@@ -244,7 +244,7 @@ static int ttyport_set_tiocm(struct serdev_controller *ctrl, unsigned int set, u
if (!tty->ops->tiocmset)
return -ENOTSUPP;
- return tty->driver->ops->tiocmset(tty, set, clear);
+ return tty->ops->tiocmset(tty, set, clear);
}
static const struct serdev_controller_ops ctrl_ops = {