OSDN Git Service

greybus: uart: Update uart.c to register tty ports
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Tue, 2 Jun 2015 12:40:47 +0000 (13:40 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 4 Jun 2015 05:08:22 +0000 (14:08 +0900)
commitf95ad78c72e72bcc922e75b80b35c6e9549b9d72
tree77955592ca119264e152b4d9df801e1de3808160
parentf5537d46cb2e062ca4a67ac86168b2bff9895615
greybus: uart: Update uart.c to register tty ports

For each new UART connection we need to do a tty_port_init else
we'll crash when trying to access the tty mutex later on.
Base the TTY major/minor numbers on non-zero values.
Supply an empty operations structure for the newly regitered port.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/uart.c