summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/spi.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2015-03-19 16:46:17 +0100
committerGreg Kroah-Hartman <greg@kroah.com>2015-03-19 17:28:19 +0100
commit25eb732954ee656edd92770f498d28f87086511b (patch)
treef7a705648d1145192123a61d049440c055dbfa89 /drivers/staging/greybus/spi.c
parentfe4c0e548aea5f4bc2df967db69d7d0b509327ef (diff)
greybus: connection: replace custom error function with dev_err
Remove custom connection error function and replace it with dev_err. The standard error function provides more information in the message prefix (e.g. includes the interface id), has a well-known semantics (e.g. does does not add newlines to messages), and is even somewhat shorter to type. Note that some uses of the custom function were already adding double newlines due to the non-standard semantics. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Diffstat (limited to 'drivers/staging/greybus/spi.c')
-rw-r--r--drivers/staging/greybus/spi.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/staging/greybus/spi.c b/drivers/staging/greybus/spi.c
index ad0c179e51f5..639c9cdac516 100644
--- a/drivers/staging/greybus/spi.c
+++ b/drivers/staging/greybus/spi.c
@@ -143,9 +143,8 @@ 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) {
- gb_connection_err(connection,
- "Bufferless transfer, length %u\n",
- xfer->len);
+ dev_err(&connection->dev,
+ "bufferless transfer, length %u\n", xfer->len);
return NULL;
}
@@ -160,8 +159,8 @@ gb_spi_operation_create(struct gb_connection *connection,
/* Too many transfers ? */
if (count > (u32)U16_MAX) {
- gb_connection_err(connection, "transfer count (%u) too big",
- count);
+ dev_err(&connection->dev, "transfer count (%u) too big\n",
+ count);
return NULL;
}
@@ -382,7 +381,7 @@ static int gb_spi_connection_init(struct gb_connection *connection)
/* Allocate master with space for data */
master = spi_alloc_master(&connection->dev, sizeof(*spi));
if (!master) {
- gb_connection_err(connection, "cannot alloc SPI master\n");
+ dev_err(&connection->dev, "cannot alloc SPI master\n");
return -ENOMEM;
}