OSDN Git Service

greybus: spi:fix sparse warnings
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 27 Jan 2015 03:38:04 +0000 (09:08 +0530)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 27 Jan 2015 22:50:23 +0000 (14:50 -0800)
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/spi.c

index 1185904..ad0c179 100644 (file)
@@ -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;
 }