LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Thomas Chou <thomas@wytron.com.tw>
To: Haavard Skinnemoen <hskinnemoen@gmail.com>,
	Grant Likely <grant.likely@secretlab.ca>,
	Ben Dooks <ben-linux@fluff.org>
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 <khali@linux-fr.org>,
	Thomas Chou <thomas@wytron.com.tw>
Subject: [PATCH 2/3] of: of_gpiochip_add is needed only for gpiolib
Date: Mon, 31 Jan 2011 23:25:50 +0800	[thread overview]
Message-ID: <1296487551-30938-2-git-send-email-thomas@wytron.com.tw> (raw)
In-Reply-To: <AANLkTimS70uHqmv3jhr+7mPz4QFKXRXuFnWj8s3EpKsO@mail.gmail.com>

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 <thomas@wytron.com.tw>
---
 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


  parent reply	other threads:[~2011-01-31 15:26 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-30 15:56 [PATCH] i2c-gpio: add devicetree support Thomas Chou
2011-01-31  3:26 ` Håvard Skinnemoen
2011-01-31  8:09   ` Grant Likely
2011-01-31 13:55     ` Jon Loeliger
2011-01-31 15:25     ` [PATCH 1/3] of: define dummy of_get_property if not CONFIG_OF Thomas Chou
2011-01-31 22:10       ` Grant Likely
2011-01-31 15:25     ` Thomas Chou [this message]
2011-01-31 22:16       ` [PATCH 2/3] of: of_gpiochip_add is needed only for gpiolib Grant Likely
2011-01-31 15:25     ` [PATCH 3/3 v2] i2c-gpio: add devicetree support Thomas Chou
2011-01-31 21:14       ` [3/3,v2] " Milton Miller
2011-01-31 21:29         ` Grant Likely
2011-02-03  2:26           ` [PATCH] " Thomas Chou
2011-02-03  4:24             ` Håvard Skinnemoen
2011-02-03 18:07             ` Grant Likely
2011-02-10  2:29               ` [PATCH v4] " Thomas Chou
2011-02-14  2:30                 ` [PATCH v5] " Thomas Chou
2011-02-16  5:49                   ` Grant Likely
2011-02-16  6:13                     ` Thomas Chou
2011-02-23  1:12                   ` Ben Dooks
2011-02-23 13:18                     ` Thomas Chou
2011-02-24  4:00                     ` [PATCH v6] " Thomas Chou
2011-02-24 16:22                       ` Grant Likely
2011-02-25  2:04                         ` Thomas Chou
2011-01-31 22:35     ` [PATCH] " Håvard Skinnemoen
2011-01-31 23:01       ` Grant Likely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1296487551-30938-2-git-send-email-thomas@wytron.com.tw \
    --to=thomas@wytron.com.tw \
    --cc=ben-linux@fluff.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=hskinnemoen@gmail.com \
    --cc=khali@linux-fr.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nios2-dev@sopc.et.ntust.edu.tw \
    --subject='Re: [PATCH 2/3] of: of_gpiochip_add is needed only for gpiolib' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).