summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel Somlo <gsomlo@gmail.com>2022-11-23 08:04:48 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-19 14:59:40 +0100
commit5996b2e338eae69aa40c9692bfd896abebc75798 (patch)
tree062ddc3b2e44d5d98f6cce3c087cbe72b8b37378
parent2696216becbe2db3eb8dba38008a5a222317167e (diff)
downloadlinux-stable-5996b2e338eae69aa40c9692bfd896abebc75798.tar.gz
linux-stable-5996b2e338eae69aa40c9692bfd896abebc75798.tar.bz2
linux-stable-5996b2e338eae69aa40c9692bfd896abebc75798.zip
serial: liteuart: use bit number macros
Replace magic bit constants (e.g., 1, 2, 4) with BIT(x) expressions. Signed-off-by: Gabriel Somlo <gsomlo@gmail.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20221123130500.1030189-3-gsomlo@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/liteuart.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/tty/serial/liteuart.c b/drivers/tty/serial/liteuart.c
index db898751ffe3..18c1eb315ee9 100644
--- a/drivers/tty/serial/liteuart.c
+++ b/drivers/tty/serial/liteuart.c
@@ -5,6 +5,7 @@
* Copyright (C) 2019-2020 Antmicro <www.antmicro.com>
*/
+#include <linux/bits.h>
#include <linux/console.h>
#include <linux/litex.h>
#include <linux/module.h>
@@ -38,8 +39,8 @@
#define OFF_EV_ENABLE 0x14
/* events */
-#define EV_TX 0x1
-#define EV_RX 0x2
+#define EV_TX BIT(0)
+#define EV_RX BIT(1)
struct liteuart_port {
struct uart_port port;