Skip to content

Commit 6200cba

Browse files
Paul Gortmakergregkh
authored andcommitted
tty: disable unbind for old 74xx based serial/mpsc console port
We recently got rid of some modular code in this driver and also got rid of the unused ".remove" function at the same time. Thierry noted that it was however possible to force the remove through the bind/unbind interface. Since this is a console device used on 2005 vintage 74xx based powerpc embedded targets, and is essentially always used in conjunction with SERIAL_MPSC_CONSOLE=y -- there is no sane reason anyone would ever want to unbind the builtin driver and lose the console. So we just explicitly block bind/unbind operations and prevent root from shooting themselves in the foot. Cc: Greg Kroah-Hartman <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: Thierry Reding <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 06e7bd1 commit 6200cba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/tty/serial/mpsc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2109,7 +2109,8 @@ static int mpsc_drv_probe(struct platform_device *dev)
21092109
static struct platform_driver mpsc_driver = {
21102110
.probe = mpsc_drv_probe,
21112111
.driver = {
2112-
.name = MPSC_CTLR_NAME,
2112+
.name = MPSC_CTLR_NAME,
2113+
.suppress_bind_attrs = true,
21132114
},
21142115
};
21152116

0 commit comments

Comments
 (0)