From: Greg Kroah-Hartman Date: Wed, 14 Oct 2015 18:15:38 +0000 (-0700) Subject: greybus: spi: use the bundle struct device instead of the connector X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1cb9e38c8c17b16b2712aaf2ca4d3509f0fe9366;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: Greg Kroah-Hartman Reviewed-by: Alex Elder --- diff --git a/drivers/staging/greybus/spi.c b/drivers/staging/greybus/spi.c index 393f28ad099b..33e86f9c3182 100644 --- a/drivers/staging/greybus/spi.c +++ b/drivers/staging/greybus/spi.c @@ -57,7 +57,7 @@ gb_spi_operation_create(struct gb_connection *connection, /* Find number of transfers queued and tx/rx length in the message */ list_for_each_entry(xfer, &msg->transfers, transfer_list) { if (!xfer->tx_buf && !xfer->rx_buf) { - dev_err(&connection->dev, + dev_err(&connection->bundle->dev, "bufferless transfer, length %u\n", xfer->len); return NULL; } @@ -73,8 +73,8 @@ gb_spi_operation_create(struct gb_connection *connection, /* Too many transfers ? */ if (count > (u32)U16_MAX) { - dev_err(&connection->dev, "transfer count (%u) too big\n", - count); + dev_err(&connection->bundle->dev, + "transfer count (%u) too big\n", count); return NULL; } @@ -286,9 +286,9 @@ static int gb_spi_connection_init(struct gb_connection *connection) int ret; /* 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) { - dev_err(&connection->dev, "cannot alloc SPI master\n"); + dev_err(&connection->bundle->dev, "cannot alloc SPI master\n"); return -ENOMEM; }