diff options
author | Greg Kroah-Hartman <gregkh@google.com> | 2016-03-22 14:30:35 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-03-22 16:47:28 -0400 |
commit | 0ec306324423444d3ee0222708ef9de7f5586b93 (patch) | |
tree | 3d6ad3817d35074b12b8d92162437e03f6ce2372 /drivers/staging/greybus/uart.c | |
parent | 418f3dab841f85e24beb6e30858cafce5cf1f87c (diff) | |
download | op-kernel-dev-0ec306324423444d3ee0222708ef9de7f5586b93.zip op-kernel-dev-0ec306324423444d3ee0222708ef9de7f5586b93.tar.gz |
greybus: convert drivers to use connection->private set/get
This converts all drivers to use the gb_connection_get_data() and
gb_connection_set_data() functions to make it a bit more explicit as to
what is going on.
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/uart.c')
-rw-r--r-- | drivers/staging/greybus/uart.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c index d169c55..c580fe0 100644 --- a/drivers/staging/greybus/uart.c +++ b/drivers/staging/greybus/uart.c @@ -69,7 +69,7 @@ static atomic_t reference_count = ATOMIC_INIT(0); static int gb_uart_receive_data_handler(struct gb_operation *op) { struct gb_connection *connection = op->connection; - struct gb_tty *gb_tty = connection->private; + struct gb_tty *gb_tty = gb_connection_get_data(connection); struct tty_port *port = &gb_tty->port; struct gb_message *request = op->request; struct gb_uart_recv_data_request *receive_data; @@ -125,7 +125,7 @@ static int gb_uart_receive_data_handler(struct gb_operation *op) static int gb_uart_serial_state_handler(struct gb_operation *op) { struct gb_connection *connection = op->connection; - struct gb_tty *gb_tty = connection->private; + struct gb_tty *gb_tty = gb_connection_get_data(connection); struct gb_message *request = op->request; struct gb_uart_serial_state_request *serial_state; @@ -658,7 +658,7 @@ static int gb_uart_connection_init(struct gb_connection *connection) } gb_tty->connection = connection; - connection->private = gb_tty; + gb_connection_set_data(connection, gb_tty); minor = alloc_minor(gb_tty); if (minor < 0) { @@ -702,7 +702,7 @@ error: tty_port_destroy(&gb_tty->port); release_minor(gb_tty); error_minor: - connection->private = NULL; + gb_connection_set_data(connection, NULL); kfree(gb_tty->buffer); error_payload: kfree(gb_tty); @@ -714,7 +714,7 @@ error_alloc: static void gb_uart_connection_exit(struct gb_connection *connection) { - struct gb_tty *gb_tty = connection->private; + struct gb_tty *gb_tty = gb_connection_get_data(connection); struct tty_struct *tty; if (!gb_tty) @@ -724,7 +724,7 @@ static void gb_uart_connection_exit(struct gb_connection *connection) gb_tty->disconnected = true; wake_up_all(&gb_tty->wioctl); - connection->private = NULL; + gb_connection_set_data(connection, NULL); mutex_unlock(&gb_tty->mutex); tty = tty_port_tty_get(&gb_tty->port); |