From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756050Ab1AaP0B (ORCPT ); Mon, 31 Jan 2011 10:26:01 -0500 Received: from www.wytron.com.tw ([211.75.82.101]:41487 "EHLO www.wytron.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755868Ab1AaPZ7 (ORCPT ); Mon, 31 Jan 2011 10:25:59 -0500 From: Thomas Chou To: Haavard Skinnemoen , Grant Likely , Ben Dooks Cc: linux-kernel@vger.kernel.org, nios2-dev@sopc.et.ntust.edu.tw, devicetree-discuss@lists.ozlabs.org, linux-i2c@vger.kernel.org, Jean Delvare , Thomas Chou Subject: [PATCH 2/3] of: of_gpiochip_add is needed only for gpiolib Date: Mon, 31 Jan 2011 23:25:50 +0800 Message-Id: <1296487551-30938-2-git-send-email-thomas@wytron.com.tw> X-Mailer: git-send-email 1.7.3.5 In-Reply-To: References: X-SA-Exim-Connect-IP: 192.168.1.250 X-SA-Exim-Mail-From: thomas@wytron.com.tw X-SA-Exim-Scanned: No (on www.wytron.com.tw); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some gpio drivers may not use gpiolib. In this case, struct gpio_chip is not defined and of_gpiochip_add/remove are not needed. Signed-off-by: Thomas Chou --- include/linux/of_gpio.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h index 6598c04..fc96af0 100644 --- a/include/linux/of_gpio.h +++ b/include/linux/of_gpio.h @@ -71,9 +71,13 @@ static inline unsigned int of_gpio_count(struct device_node *np) return 0; } +#ifdef CONFIG_GPIOLIB + static inline void of_gpiochip_add(struct gpio_chip *gc) { } static inline void of_gpiochip_remove(struct gpio_chip *gc) { } +#endif /* CONFIG_GPIOLIB */ + #endif /* CONFIG_OF_GPIO */ /** -- 1.7.3.5