gpio: squelch a compiler warning
Martin Kaiser [Fri, 30 Jan 2015 14:01:29 +0000 (15:01 +0100)]
drivers/gpio/gpiolib-of.c: In function 'of_gpiochip_find_and_xlate':
drivers/gpio/gpiolib-of.c:51:21: warning: assignment makes integer from
pointer without a cast [enabled by default]
   gg_data->out_gpio = ERR_PTR(ret);
                     ^
this was introduced in d1c3449160df60fac4abb56f0ba0a3784305e43e

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

Upstream commit 60e353b14ad68daaef8685cc324fa45501615bee

Bug 200063550

Change-Id: I8194086ccf25b3021edf53bc85705c82e929fee4
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ishan Mittal <imittal@nvidia.com>
Reviewed-on: http://git-master/r/716315
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

drivers/gpio/gpiolib-of.c

index 08da2ec..80336a7 100644 (file)
@@ -48,7 +48,7 @@ static int of_gpiochip_find_and_xlate(struct gpio_chip *gc, void *data)
                 * Return true to stop looking and return the translation
                 * error via out_gpio
                 */
-               gg_data->out_gpio = ERR_PTR(ret);
+               gg_data->out_gpio = ret;
                return true;
         }