From: Grant Likely <grant.likely@secretlab.ca>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>,
Linus Walleij <linus.walleij@stericsson.com>
Cc: linux-kernel@vger.kernel.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: Re: [PATCH 1/2] gpiolib: Add !CONFIG_GPIOLIB definitions of devm_ functions
Date: Thu, 05 Apr 2012 21:40:51 -0700 [thread overview]
Message-ID: <20120406044051.E99D63E0E8D@localhost> (raw)
In-Reply-To: <1333552489-27694-1-git-send-email-broonie@opensource.wolfsonmicro.com>
On Wed, 4 Apr 2012 16:14:48 +0100, Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
> Currently the managed gpio_request() and gpio_free() are not stubbed out
> for configurations not using gpiolib - do that to aid use in drivers.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Applied, thanks.
g.
> ---
> include/linux/gpio.h | 14 ++++++++++++++
> 1 files changed, 14 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/gpio.h b/include/linux/gpio.h
> index f8b46af..ceb8eef 100644
> --- a/include/linux/gpio.h
> +++ b/include/linux/gpio.h
> @@ -89,6 +89,12 @@ static inline int gpio_request(unsigned gpio, const char *label)
> return -ENOSYS;
> }
>
> +static inline int devm_gpio_request(struct device *dev, unsigned gpio,
> + const char *label)
> +{
> + return -ENOSYS;
> +}
> +
> static inline int gpio_request_one(unsigned gpio,
> unsigned long flags, const char *label)
> {
> @@ -108,6 +114,14 @@ static inline void gpio_free(unsigned gpio)
> WARN_ON(1);
> }
>
> +static inline void devm_gpio_free(struct device *dev, unsigned gpio)
> +{
> + might_sleep();
> +
> + /* GPIO can never have been requested */
> + WARN_ON(1);
> +}
> +
> static inline void gpio_free_array(const struct gpio *array, size_t num)
> {
> might_sleep();
> --
> 1.7.9.1
>
--
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies,Ltd.
next prev parent reply other threads:[~2012-04-06 14:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-04 15:14 [PATCH 1/2] gpiolib: Add !CONFIG_GPIOLIB definitions of devm_ functions Mark Brown
2012-04-04 15:14 ` [PATCH 2/2] gpiolib: Implement devm_gpio_request_one() Mark Brown
2012-04-06 4:48 ` Grant Likely
2012-04-06 14:49 ` Mark Brown
2012-04-07 2:25 ` Grant Likely
2012-04-07 9:00 ` Mark Brown
2012-04-07 9:16 ` Mark Brown
2012-04-06 4:40 ` Grant Likely [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-05-02 11:46 [PATCH 1/2] gpiolib: Add !CONFIG_GPIOLIB definitions of devm_ functions Mark Brown
2012-05-18 0:11 ` 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=20120406044051.E99D63E0E8D@localhost \
--to=grant.likely@secretlab.ca \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linus.walleij@stericsson.com \
--cc=linux-kernel@vger.kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).