From: Greg Kroah-Hartman Date: Mon, 27 Oct 2014 04:33:47 +0000 (+0800) Subject: greybus: gpio-gb: fix some endian sparse warnings that were real. X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1958 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d4c8247b56a3c3f9c8c879189338d2fa13a281a0;p=karo-tx-linux.git 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 --- diff --git a/drivers/staging/greybus/gpio-gb.c b/drivers/staging/greybus/gpio-gb.c index 32bf45ff7e8b..069ee69dc0e7 100644 --- a/drivers/staging/greybus/gpio-gb.c +++ b/drivers/staging/greybus/gpio-gb.c @@ -551,7 +551,7 @@ static int gb_gpio_set_debounce_operation(struct gb_gpio_controller *gb_gpio_con 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 @@ static int gb_gpio_set_debounce_operation(struct gb_gpio_controller *gb_gpio_con 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 @@ static void gb_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip) 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;