summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorSam Protsenko <semen.protsenko@linaro.org>2021-10-05 11:58:00 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-10-10 15:20:16 +0200
commitb84d0001512aec42bd3357bf66ab13ade1c633cf (patch)
tree56b997c3e3b344eb0090f2d80161d39398e8e2c0 /drivers/tty
parenttty: serial: atmel: use macros instead of hardcoded values (diff)
downloadlinux-b84d0001512aec42bd3357bf66ab13ade1c633cf.tar.xz
linux-b84d0001512aec42bd3357bf66ab13ade1c633cf.zip
tty: serial: samsung: Improve naming for common macro
Having "_USI" suffix in EXYNOS_COMMON_SERIAL_DRV_DATA_USI() macro is confusing. Rename it to just EXYNOS_COMMON_SERIAL_DRV_DATA() and provide USI registers availability for all Exynos variants instead. While at it, also convert .has_usi field type to bool, so its usage is more obvious. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Link: https://lore.kernel.org/r/20211005095800.2165-1-semen.protsenko@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/samsung_tty.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index e2f49863e9c2..ca084c10d0bb 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -65,7 +65,7 @@ enum s3c24xx_port_type {
struct s3c24xx_uart_info {
char *name;
enum s3c24xx_port_type type;
- unsigned int has_usi;
+ bool has_usi;
unsigned int port_type;
unsigned int fifosize;
unsigned long rx_fifomask;
@@ -2780,7 +2780,7 @@ static struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = {
#endif
#if defined(CONFIG_ARCH_EXYNOS)
-#define EXYNOS_COMMON_SERIAL_DRV_DATA_USI(_has_usi) \
+#define EXYNOS_COMMON_SERIAL_DRV_DATA(_has_usi) \
.info = &(struct s3c24xx_uart_info) { \
.name = "Samsung Exynos UART", \
.type = TYPE_S3C6400, \
@@ -2804,21 +2804,18 @@ static struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = {
.has_fracval = 1, \
} \
-#define EXYNOS_COMMON_SERIAL_DRV_DATA \
- EXYNOS_COMMON_SERIAL_DRV_DATA_USI(0)
-
static struct s3c24xx_serial_drv_data exynos4210_serial_drv_data = {
- EXYNOS_COMMON_SERIAL_DRV_DATA,
+ EXYNOS_COMMON_SERIAL_DRV_DATA(false),
.fifosize = { 256, 64, 16, 16 },
};
static struct s3c24xx_serial_drv_data exynos5433_serial_drv_data = {
- EXYNOS_COMMON_SERIAL_DRV_DATA,
+ EXYNOS_COMMON_SERIAL_DRV_DATA(false),
.fifosize = { 64, 256, 16, 256 },
};
static struct s3c24xx_serial_drv_data exynos850_serial_drv_data = {
- EXYNOS_COMMON_SERIAL_DRV_DATA_USI(1),
+ EXYNOS_COMMON_SERIAL_DRV_DATA(true),
.fifosize = { 256, 64, 64, 64 },
};