From: Greg Kroah-Hartman Date: Wed, 14 Oct 2015 18:15:12 +0000 (-0700) Subject: greybus: uart: use the bundle struct device instead of the connector X-Git-Tag: v4.9.8~1233^2~378^2~21^2~1129 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f30bf3aef416ce6870a6da68e42957aeb4edb76;p=platform%2Fkernel%2Flinux-rpi3.git 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 --- diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c index 9e8bf6f..ec978a4 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;