greybus: gpio-gb: fix some endian sparse warnings that were real.
Not like we are ever going to use a BE cpu, but it's good to be
"correct"...
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
diff --git a/drivers/staging/greybus/gpio-gb.c b/drivers/staging/greybus/gpio-gb.c
index 32bf45f..069ee69 100644
--- a/drivers/staging/greybus/gpio-gb.c
+++ b/drivers/staging/greybus/gpio-gb.c
@@ -551,7 +551,7 @@
return -ENOMEM;
request = operation->request_payload;
request->which = which;
- request->usec = le16_to_cpu(debounce_usec);
+ request->usec = cpu_to_le16(debounce_usec);
/* Synchronous operation--no callback */
ret = gb_operation_request_send(operation, NULL);
@@ -566,9 +566,9 @@
response->status);
ret = -EIO;
} else {
- gb_gpio_controller->lines[which].debounce_usec = request->usec;
-printk("%s: debounce of %u is now %hu usec\n", __func__,
- which, gb_gpio_controller->lines[which].debounce_usec);
+ gb_gpio_controller->lines[which].debounce_usec = le16_to_cpu(request->usec);
+ printk("%s: debounce of %u is now %hu usec\n", __func__, which,
+ gb_gpio_controller->lines[which].debounce_usec);
}
out:
gb_operation_destroy(operation);
@@ -709,7 +709,7 @@
return; /* XXX */
}
-int gb_gpio_controller_setup(struct gb_gpio_controller *gb_gpio_controller)
+static int gb_gpio_controller_setup(struct gb_gpio_controller *gb_gpio_controller)
{
u32 line_count;
size_t size;