diff mbox

[1/3] gpiolib: Add missing dummies for the unified device properties interface

Message ID 1430986090-7243-2-git-send-email-geert@linux-m68k.org
State New
Headers show

Commit Message

Geert Uytterhoeven May 7, 2015, 8:08 a.m. UTC
If GPIOLIB=n:

    drivers/leds/leds-gpio.c: In function ‘gpio_leds_create’:
    drivers/leds/leds-gpio.c:187: error: implicit declaration of function ‘devm_get_gpiod_from_child’
    drivers/leds/leds-gpio.c:187: warning: assignment makes pointer from integer without a cast

Add dummies for fwnode_get_named_gpiod() and devm_get_gpiod_from_child()
for the !GPIOLIB case to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Fixes: 40b7318319281b1b ("gpio: Support for unified device properties interface")
---
 include/linux/gpio/consumer.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Bryan Wu May 8, 2015, 5:43 p.m. UTC | #1
On Thu, May 7, 2015 at 1:08 AM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> If GPIOLIB=n:
>
>     drivers/leds/leds-gpio.c: In function ‘gpio_leds_create’:
>     drivers/leds/leds-gpio.c:187: error: implicit declaration of function ‘devm_get_gpiod_from_child’
>     drivers/leds/leds-gpio.c:187: warning: assignment makes pointer from integer without a cast
>
> Add dummies for fwnode_get_named_gpiod() and devm_get_gpiod_from_child()
> for the !GPIOLIB case to fix this.
>

Geert,

This patch looks good to me. Do you mind merging it through LED tree
with other 2 more LED patches?

Thanks,
-Bryan


> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Fixes: 40b7318319281b1b ("gpio: Support for unified device properties interface")
> ---
>  include/linux/gpio/consumer.h | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h
> index 3a7c9ffd5ab930b4..da042657dc31d7f5 100644
> --- a/include/linux/gpio/consumer.h
> +++ b/include/linux/gpio/consumer.h
> @@ -406,6 +406,21 @@ static inline int desc_to_gpio(const struct gpio_desc *desc)
>         return -EINVAL;
>  }
>
> +/* Child properties interface */
> +struct fwnode_handle;
> +
> +static inline struct gpio_desc *fwnode_get_named_gpiod(
> +       struct fwnode_handle *fwnode, const char *propname)
> +{
> +       return ERR_PTR(-ENOSYS);
> +}
> +
> +static inline struct gpio_desc *devm_get_gpiod_from_child(
> +       struct device *dev, const char *con_id, struct fwnode_handle *child)
> +{
> +       return ERR_PTR(-ENOSYS);
> +}
> +
>  #endif /* CONFIG_GPIOLIB */
>
>  /*
> --
> 1.9.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alexandre Courbot May 12, 2015, 7:47 a.m. UTC | #2
On Thu, May 7, 2015 at 5:08 PM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> If GPIOLIB=n:
>
>     drivers/leds/leds-gpio.c: In function ‘gpio_leds_create’:
>     drivers/leds/leds-gpio.c:187: error: implicit declaration of function ‘devm_get_gpiod_from_child’
>     drivers/leds/leds-gpio.c:187: warning: assignment makes pointer from integer without a cast
>
> Add dummies for fwnode_get_named_gpiod() and devm_get_gpiod_from_child()
> for the !GPIOLIB case to fix this.

This was obviously missing.

Acked-by: Alexandre Courbot <acourbot@nvidia.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Geert Uytterhoeven May 12, 2015, 7:48 a.m. UTC | #3
Hi Bryan,

On Fri, May 8, 2015 at 7:43 PM, Bryan Wu <cooloney@gmail.com> wrote:
> On Thu, May 7, 2015 at 1:08 AM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>> If GPIOLIB=n:
>>
>>     drivers/leds/leds-gpio.c: In function ‘gpio_leds_create’:
>>     drivers/leds/leds-gpio.c:187: error: implicit declaration of function ‘devm_get_gpiod_from_child’
>>     drivers/leds/leds-gpio.c:187: warning: assignment makes pointer from integer without a cast
>>
>> Add dummies for fwnode_get_named_gpiod() and devm_get_gpiod_from_child()
>> for the !GPIOLIB case to fix this.
>
> This patch looks good to me. Do you mind merging it through LED tree
> with other 2 more LED patches?

Now we have an ack from Alex, that's fine for me. Thanks!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Linus Walleij May 12, 2015, 10:31 a.m. UTC | #4
On Thu, May 7, 2015 at 10:08 AM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:

> If GPIOLIB=n:
>
>     drivers/leds/leds-gpio.c: In function ‘gpio_leds_create’:
>     drivers/leds/leds-gpio.c:187: error: implicit declaration of function ‘devm_get_gpiod_from_child’
>     drivers/leds/leds-gpio.c:187: warning: assignment makes pointer from integer without a cast
>
> Add dummies for fwnode_get_named_gpiod() and devm_get_gpiod_from_child()
> for the !GPIOLIB case to fix this.
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Fixes: 40b7318319281b1b ("gpio: Support for unified device properties interface")

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Counting on this to go through the LEDs tree as discussed.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Bryan Wu May 12, 2015, 5:48 p.m. UTC | #5
On Tue, May 12, 2015 at 3:31 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Thu, May 7, 2015 at 10:08 AM, Geert Uytterhoeven
> <geert@linux-m68k.org> wrote:
>
>> If GPIOLIB=n:
>>
>>     drivers/leds/leds-gpio.c: In function ‘gpio_leds_create’:
>>     drivers/leds/leds-gpio.c:187: error: implicit declaration of function ‘devm_get_gpiod_from_child’
>>     drivers/leds/leds-gpio.c:187: warning: assignment makes pointer from integer without a cast
>>
>> Add dummies for fwnode_get_named_gpiod() and devm_get_gpiod_from_child()
>> for the !GPIOLIB case to fix this.
>>
>> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
>> Fixes: 40b7318319281b1b ("gpio: Support for unified device properties interface")
>
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
>
> Counting on this to go through the LEDs tree as discussed.
>
> Yours,
> Linus Walleij


OK, merged with Alex and Linus Acks. Thanks,
-Bryan
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h
index 3a7c9ffd5ab930b4..da042657dc31d7f5 100644
--- a/include/linux/gpio/consumer.h
+++ b/include/linux/gpio/consumer.h
@@ -406,6 +406,21 @@  static inline int desc_to_gpio(const struct gpio_desc *desc)
 	return -EINVAL;
 }
 
+/* Child properties interface */
+struct fwnode_handle;
+
+static inline struct gpio_desc *fwnode_get_named_gpiod(
+	struct fwnode_handle *fwnode, const char *propname)
+{
+	return ERR_PTR(-ENOSYS);
+}
+
+static inline struct gpio_desc *devm_get_gpiod_from_child(
+	struct device *dev, const char *con_id, struct fwnode_handle *child)
+{
+	return ERR_PTR(-ENOSYS);
+}
+
 #endif /* CONFIG_GPIOLIB */
 
 /*