From 4f30bf3aef416ce6870a6da68e42957aeb4edb76 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 14 Oct 2015 11:15:12 -0700 Subject: [PATCH] greybus: uart: use the bundle struct device instead of the connector We are removing struct device from the gb_connection structure in the near future. The gb_bundle structure's struct device should be used as a replacement. This patch moves the uart driver to use the bundle pointer instead of the connection pointer. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Alex Elder --- drivers/staging/greybus/uart.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c index 9e8bf6f4b8d7..ec978a451b17 100644 --- a/drivers/staging/greybus/uart.c +++ b/drivers/staging/greybus/uart.c @@ -94,7 +94,7 @@ static int gb_uart_receive_data(struct gb_tty *gb_tty, count = tty_insert_flip_string_fixed_flag(port, receive_data->data, tty_flags, recv_data_size); if (count != recv_data_size) { - dev_err(&connection->dev, + dev_err(&connection->bundle->dev, "UART: RX 0x%08x bytes only wrote 0x%08x\n", recv_data_size, count); } @@ -121,7 +121,7 @@ static int gb_uart_request_recv(u8 type, struct gb_operation *op) gb_tty->ctrlin = serial_state->control; break; default: - dev_err(&connection->dev, + dev_err(&connection->bundle->dev, "unsupported unsolicited request: %02x\n", type); ret = -EINVAL; } @@ -175,7 +175,7 @@ static int send_break(struct gb_tty *gb_tty, u8 state) struct gb_uart_set_break_request request; if ((state != 0) && (state != 1)) { - dev_err(&gb_tty->connection->dev, + dev_err(&gb_tty->connection->bundle->dev, "invalid break state of %d\n", state); return -EINVAL; } @@ -626,7 +626,7 @@ static int gb_uart_connection_init(struct gb_connection *connection) minor = alloc_minor(gb_tty); if (minor < 0) { if (minor == -ENOSPC) { - dev_err(&connection->dev, + dev_err(&connection->bundle->dev, "no more free minor numbers\n"); retval = -ENODEV; goto error_minor; @@ -654,7 +654,7 @@ static int gb_uart_connection_init(struct gb_connection *connection) send_line_coding(gb_tty); tty_dev = tty_port_register_device(&gb_tty->port, gb_tty_driver, minor, - &connection->dev); + &connection->bundle->dev); if (IS_ERR(tty_dev)) { retval = PTR_ERR(tty_dev); goto error; -- 2.20.1