From b300fb26c59a749bf49559932fa8a85eb916b5a7 Mon Sep 17 00:00:00 2001 From: Ilpo Järvinen Date: Tue, 17 Jan 2023 11:03:52 +0200 Subject: tty: Convert ->carrier_raised() and callchains to bool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return boolean from ->carrier_raised() instead of 0 and 1. Make the return type change also to tty_port_carrier_raised() that makes the ->carrier_raised() call (+ cd variable in moxa into which its return value is stored). Also cleans up a few unnecessary constructs related to this change: return xx ? 1 : 0; -> return xx; if (xx) return 1; return 0; -> return xx; Reviewed-by: Jiri Slaby Acked-by: Ulf Hansson # For MMC Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230117090358.4796-7-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- drivers/tty/amiserial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/tty/amiserial.c') diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c index 460d33a1e70b..01c4fd3ce7c8 100644 --- a/drivers/tty/amiserial.c +++ b/drivers/tty/amiserial.c @@ -1454,7 +1454,7 @@ static const struct tty_operations serial_ops = { .proc_show = rs_proc_show, }; -static int amiga_carrier_raised(struct tty_port *port) +static bool amiga_carrier_raised(struct tty_port *port) { return !(ciab.pra & SER_DCD); } -- cgit v1.2.3