Commit 1cb9e38c authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

greybus: spi: 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 spi driver to use the bundle pointer instead of the
connection pointer.
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
parent 4f30bf3a
...@@ -57,7 +57,7 @@ gb_spi_operation_create(struct gb_connection *connection, ...@@ -57,7 +57,7 @@ gb_spi_operation_create(struct gb_connection *connection,
/* Find number of transfers queued and tx/rx length in the message */ /* Find number of transfers queued and tx/rx length in the message */
list_for_each_entry(xfer, &msg->transfers, transfer_list) { list_for_each_entry(xfer, &msg->transfers, transfer_list) {
if (!xfer->tx_buf && !xfer->rx_buf) { if (!xfer->tx_buf && !xfer->rx_buf) {
dev_err(&connection->dev, dev_err(&connection->bundle->dev,
"bufferless transfer, length %u\n", xfer->len); "bufferless transfer, length %u\n", xfer->len);
return NULL; return NULL;
} }
...@@ -73,8 +73,8 @@ gb_spi_operation_create(struct gb_connection *connection, ...@@ -73,8 +73,8 @@ gb_spi_operation_create(struct gb_connection *connection,
/* Too many transfers ? */ /* Too many transfers ? */
if (count > (u32)U16_MAX) { if (count > (u32)U16_MAX) {
dev_err(&connection->dev, "transfer count (%u) too big\n", dev_err(&connection->bundle->dev,
count); "transfer count (%u) too big\n", count);
return NULL; return NULL;
} }
...@@ -286,9 +286,9 @@ static int gb_spi_connection_init(struct gb_connection *connection) ...@@ -286,9 +286,9 @@ static int gb_spi_connection_init(struct gb_connection *connection)
int ret; int ret;
/* Allocate master with space for data */ /* Allocate master with space for data */
master = spi_alloc_master(&connection->dev, sizeof(*spi)); master = spi_alloc_master(&connection->bundle->dev, sizeof(*spi));
if (!master) { if (!master) {
dev_err(&connection->dev, "cannot alloc SPI master\n"); dev_err(&connection->bundle->dev, "cannot alloc SPI master\n");
return -ENOMEM; return -ENOMEM;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment