Skip to content

Commit

Permalink
tty: disable unbind for old 74xx based serial/mpsc console port
Browse files Browse the repository at this point in the history
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 <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: linux-serial@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Paul Gortmaker authored and Greg Kroah-Hartman committed Oct 18, 2015
1 parent 06e7bd1 commit 6200cba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/tty/serial/mpsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2109,7 +2109,8 @@ static int mpsc_drv_probe(struct platform_device *dev)
static struct platform_driver mpsc_driver = {
.probe = mpsc_drv_probe,
.driver = {
.name = MPSC_CTLR_NAME,
.name = MPSC_CTLR_NAME,
.suppress_bind_attrs = true,
},
};

Expand Down

0 comments on commit 6200cba

Please sign in to comment.