summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/uart.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2015-10-14 11:15:12 -0700
committerGreg Kroah-Hartman <gregkh@google.com>2015-10-15 09:19:15 -0700
commit4f30bf3aef416ce6870a6da68e42957aeb4edb76 (patch)
tree87dfa8032a252c2155d3683b467deb860c392772 /drivers/staging/greybus/uart.c
parent5ae2f55b3571408caa6ee0dc908dc60131da7cf6 (diff)
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 <gregkh@google.com> Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'drivers/staging/greybus/uart.c')
-rw-r--r--drivers/staging/greybus/uart.c10
1 files 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;