Commit d4c8247b authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

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: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent f9624ded
...@@ -551,7 +551,7 @@ static int gb_gpio_set_debounce_operation(struct gb_gpio_controller *gb_gpio_con ...@@ -551,7 +551,7 @@ static int gb_gpio_set_debounce_operation(struct gb_gpio_controller *gb_gpio_con
return -ENOMEM; return -ENOMEM;
request = operation->request_payload; request = operation->request_payload;
request->which = which; request->which = which;
request->usec = le16_to_cpu(debounce_usec); request->usec = cpu_to_le16(debounce_usec);
/* Synchronous operation--no callback */ /* Synchronous operation--no callback */
ret = gb_operation_request_send(operation, NULL); ret = gb_operation_request_send(operation, NULL);
...@@ -566,9 +566,9 @@ static int gb_gpio_set_debounce_operation(struct gb_gpio_controller *gb_gpio_con ...@@ -566,9 +566,9 @@ static int gb_gpio_set_debounce_operation(struct gb_gpio_controller *gb_gpio_con
response->status); response->status);
ret = -EIO; ret = -EIO;
} else { } else {
gb_gpio_controller->lines[which].debounce_usec = request->usec; gb_gpio_controller->lines[which].debounce_usec = le16_to_cpu(request->usec);
printk("%s: debounce of %u is now %hu usec\n", __func__, printk("%s: debounce of %u is now %hu usec\n", __func__, which,
which, gb_gpio_controller->lines[which].debounce_usec); gb_gpio_controller->lines[which].debounce_usec);
} }
out: out:
gb_operation_destroy(operation); gb_operation_destroy(operation);
...@@ -709,7 +709,7 @@ static void gb_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip) ...@@ -709,7 +709,7 @@ static void gb_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
return; /* XXX */ 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; u32 line_count;
size_t size; size_t size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment