From 0858fe3c9c8bf0e4a73da7b2759950ee75ed8995 Mon Sep 17 00:00:00 2001 From: Ludovic Barre Date: Fri, 1 Dec 2017 17:36:51 +0100 Subject: [PATCH] serial: stm32: fix name conflict with 8250 This patch replaces stm32 tty name ttyS by ttySTM to avoid a name conflict when Serial: 8250/16550 driver is activated. sysfs: cannot create duplicate filename '/class/tty/ttyS3' Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.0-12903-gb392521-dirty #1 [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0x90/0xa4) [] (dump_stack) from [] (__warn+0xf8/0x110) [] (__warn) from [] (warn_slowpath_fmt+0x38/0x48) [] (warn_slowpath_fmt) from [] (sysfs_warn_dup+0x68/0x78) [] (sysfs_warn_dup) from [] (sysfs_do_create_link_sd+0xb4/0xc4) [] (sysfs_do_create_link_sd) from [] (device_add+0x204/0x574) [] (device_add) from [] (tty_register_device_attr+0xc8/0x1bc) [] (tty_register_device_attr) from [] (uart_add_one_port+0x22c/0x4f4) Signed-off-by: Ludovic Barre Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/stm32-usart.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/stm32-usart.h b/drivers/tty/serial/stm32-usart.h index 8a5ff54d0f42..2294d0f05872 100644 --- a/drivers/tty/serial/stm32-usart.h +++ b/drivers/tty/serial/stm32-usart.h @@ -236,7 +236,7 @@ struct stm32_usart_info stm32h7_info = { #define USART_ICR_CMCF BIT(17) /* F7 */ #define USART_ICR_WUCF BIT(20) /* H7 */ -#define STM32_SERIAL_NAME "ttyS" +#define STM32_SERIAL_NAME "ttySTM" #define STM32_MAX_PORTS 8 #define RX_BUF_L 200 /* dma rx buffer length */ -- 2.39.5