]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
gpio: squelch a compiler warning
authorMartin Kaiser <lists@kaiser.cx>
Fri, 30 Jan 2015 14:01:29 +0000 (15:01 +0100)
committerJiri Slaby <jslaby@suse.cz>
Thu, 21 May 2015 11:25:48 +0000 (13:25 +0200)
drivers/gpio/gpiolib-of.c: In function 'of_gpiochip_find_and_xlate':
drivers/gpio/gpiolib-of.c:52:21: warning: assignment makes integer from pointer without a cast [enabled by default]
   gg_data->out_gpio = ERR_PTR(ret);
                     ^
This was introduced in 72464765733575dc89c509f16caabc2af47fda79, a
backport of upstream commit 7b8792bbdffdff3abda704f89c6a45ea97afdc62.

The upstream kernel changed the type of out_gpio from int to struct gpio_desc *
as part of a larger refactoring that wasn't backported

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/gpio/gpiolib-of.c

index 836af49da9018803f8f2e9b3288d935ff74d9401..1c031878b6ab9865e9b1881b91e974bdd81bc203 100644 (file)
@@ -49,7 +49,7 @@ static int of_gpiochip_find_and_xlate(struct gpio_chip *gc, void *data)
                 * Return false to keep looking, as more than one gpio chip
                 * could be registered per of-node.
                 */
-               gg_data->out_gpio = ERR_PTR(ret);
+               gg_data->out_gpio = ret;
                return false;
         }