diff options
author | Johan Hovold <johan@kernel.org> | 2020-12-02 12:39:37 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-12-09 15:27:42 +0100 |
commit | 9e1792727ead477f49958578d0dbd466a7deea48 (patch) | |
tree | c502ad2be7de6c0487593dacfa3edadb7cf469e6 /include/linux/tty.h | |
parent | af633212c4aac1dbd3a48615a834646ce072346d (diff) | |
download | linux-9e1792727ead477f49958578d0dbd466a7deea48.tar.gz linux-9e1792727ead477f49958578d0dbd466a7deea48.tar.bz2 linux-9e1792727ead477f49958578d0dbd466a7deea48.zip |
tty: use const parameters in port-flag accessors
Declare the port parameter to the flag-test accessors as const.
This is currently mostly cosmetic as the accessors are already inlined.
Suggested-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20201202113942.27024-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r-- | include/linux/tty.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h index 9b8e7d5bf2fc..c873f475f0a7 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -608,7 +608,7 @@ static inline struct tty_port *tty_port_get(struct tty_port *port) } /* If the cts flow control is enabled, return true. */ -static inline bool tty_port_cts_enabled(struct tty_port *port) +static inline bool tty_port_cts_enabled(const struct tty_port *port) { return test_bit(TTY_PORT_CTS_FLOW, &port->iflags); } @@ -618,7 +618,7 @@ static inline void tty_port_set_cts_flow(struct tty_port *port, bool val) assign_bit(TTY_PORT_CTS_FLOW, &port->iflags, val); } -static inline bool tty_port_active(struct tty_port *port) +static inline bool tty_port_active(const struct tty_port *port) { return test_bit(TTY_PORT_ACTIVE, &port->iflags); } @@ -628,7 +628,7 @@ static inline void tty_port_set_active(struct tty_port *port, bool val) assign_bit(TTY_PORT_ACTIVE, &port->iflags, val); } -static inline bool tty_port_check_carrier(struct tty_port *port) +static inline bool tty_port_check_carrier(const struct tty_port *port) { return test_bit(TTY_PORT_CHECK_CD, &port->iflags); } @@ -638,7 +638,7 @@ static inline void tty_port_set_check_carrier(struct tty_port *port, bool val) assign_bit(TTY_PORT_CHECK_CD, &port->iflags, val); } -static inline bool tty_port_suspended(struct tty_port *port) +static inline bool tty_port_suspended(const struct tty_port *port) { return test_bit(TTY_PORT_SUSPENDED, &port->iflags); } @@ -648,7 +648,7 @@ static inline void tty_port_set_suspended(struct tty_port *port, bool val) assign_bit(TTY_PORT_SUSPENDED, &port->iflags, val); } -static inline bool tty_port_initialized(struct tty_port *port) +static inline bool tty_port_initialized(const struct tty_port *port) { return test_bit(TTY_PORT_INITIALIZED, &port->iflags); } @@ -658,7 +658,7 @@ static inline void tty_port_set_initialized(struct tty_port *port, bool val) assign_bit(TTY_PORT_INITIALIZED, &port->iflags, val); } -static inline bool tty_port_kopened(struct tty_port *port) +static inline bool tty_port_kopened(const struct tty_port *port) { return test_bit(TTY_PORT_KOPENED, &port->iflags); } |