From patchwork Thu May 7 08:08:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 469331 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id BE87E14028F for ; Thu, 7 May 2015 18:09:20 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751373AbbEGIJT (ORCPT ); Thu, 7 May 2015 04:09:19 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:33974 "EHLO laurent.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751136AbbEGIIQ (ORCPT ); Thu, 7 May 2015 04:08:16 -0400 Received: from ayla.of.borg ([84.193.93.87]) by laurent.telenet-ops.be with bizsmtp id Qw8E1q00S1t5w8s01w8ETi; Thu, 07 May 2015 10:08:14 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1YqGqq-0000nb-3M; Thu, 07 May 2015 10:08:12 +0200 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1YqGqq-0001tX-Kz; Thu, 07 May 2015 10:08:12 +0200 From: Geert Uytterhoeven To: Linus Walleij , Alexandre Courbot , Bryan Wu , Richard Purdie , Arnd Bergmann Cc: Jacek Anaszewski , linux-gpio@vger.kernel.org, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 1/3] gpiolib: Add missing dummies for the unified device properties interface Date: Thu, 7 May 2015 10:08:08 +0200 Message-Id: <1430986090-7243-2-git-send-email-geert@linux-m68k.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430986090-7243-1-git-send-email-geert@linux-m68k.org> References: <1430986090-7243-1-git-send-email-geert@linux-m68k.org> MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 Fixes: 40b7318319281b1b ("gpio: Support for unified device properties interface") Acked-by: Alexandre Courbot Acked-by: Linus Walleij --- 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 */ /*