Skip to content

Commit 2e94d5a

Browse files
andy-shevgregkh
authored andcommitted
serial: core: constify struct uart_port {name} field
Don't allow modifications of port name. It's serial core's business only. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 6fe729c commit 2e94d5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/serial_core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ struct uart_port {
247247
unsigned char suspended;
248248
unsigned char irq_wake;
249249
unsigned char unused[2];
250-
char *name; /* port name */
250+
const char *name; /* port name */
251251
struct attribute_group *attr_group; /* port specific attributes */
252252
const struct attribute_group **tty_groups; /* all attributes (serial core use only) */
253253
struct serial_rs485 rs485;

0 commit comments

Comments
 (0)