summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/spi.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-01-27 09:08:04 +0530
committerGreg Kroah-Hartman <greg@kroah.com>2015-01-27 14:50:23 -0800
commitf4e6c817b377833a725ba0be80c29fbb59ffd0f7 (patch)
treeba56807aeb7ff7644d5dce880d5bb5387b5cd7be /drivers/staging/greybus/spi.c
parentb3b983c2eee8e7464651caa63bbbd6ca4bb65830 (diff)
greybus: spi:fix sparse warnings
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Diffstat (limited to 'drivers/staging/greybus/spi.c')
-rw-r--r--drivers/staging/greybus/spi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/greybus/spi.c b/drivers/staging/greybus/spi.c
index 11859047ac31..ad0c179e51f5 100644
--- a/drivers/staging/greybus/spi.c
+++ b/drivers/staging/greybus/spi.c
@@ -180,7 +180,7 @@ gb_spi_operation_create(struct gb_connection *connection,
return NULL;
request = operation->request->payload;
- request->count = count;
+ request->count = cpu_to_le16(count);
request->mode = dev->mode;
request->chip_select = dev->chip_select;
@@ -189,7 +189,7 @@ gb_spi_operation_create(struct gb_connection *connection,
/* Fill in the transfers array */
list_for_each_entry(xfer, &msg->transfers, transfer_list) {
- gb_xfer->speed_hz = cpu_to_le16(xfer->speed_hz);
+ gb_xfer->speed_hz = cpu_to_le32(xfer->speed_hz);
gb_xfer->len = cpu_to_le32(xfer->len);
gb_xfer->delay_usecs = cpu_to_le16(xfer->delay_usecs);
gb_xfer->cs_change = xfer->cs_change;
@@ -335,7 +335,7 @@ static int gb_spi_chipselect_operation(struct gb_spi *spi)
if (ret)
return ret;
- spi->num_chipselect = le32_to_cpu(response.num_chipselect);
+ spi->num_chipselect = le16_to_cpu(response.num_chipselect);
return 0;
}