From: Alexandre Courbot <acourbot@nvidia.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: <linux-gpio@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<gnurou@gmail.com>, Alexandre Courbot <acourbot@nvidia.com>
Subject: [PATCH 1/3] gpiolib: devres: fix devm_gpiod_get_index()
Date: Sun, 20 Oct 2013 15:14:57 -0700 [thread overview]
Message-ID: <1382307299-22587-2-git-send-email-acourbot@nvidia.com> (raw)
In-Reply-To: <1382307299-22587-1-git-send-email-acourbot@nvidia.com>
Fix the return value if devm_gpiod_get_index(). It was returning 0 while
it should return the obtained GPIO descriptor.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
drivers/gpio/devres.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/devres.c b/drivers/gpio/devres.c
index 2caa257..fceebdc 100644
--- a/drivers/gpio/devres.c
+++ b/drivers/gpio/devres.c
@@ -80,7 +80,7 @@ struct gpio_desc *__must_check devm_gpiod_get_index(struct device *dev,
*dr = desc;
devres_add(dev, dr);
- return 0;
+ return desc;
}
EXPORT_SYMBOL(devm_gpiod_get_index);
--
1.8.4.1
next prev parent reply other threads:[~2013-10-20 22:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-20 22:14 [PATCH 0/3] Fixup patches for gpiod interface Alexandre Courbot
2013-10-20 22:14 ` Alexandre Courbot [this message]
2013-10-23 8:09 ` [PATCH 1/3] gpiolib: devres: fix devm_gpiod_get_index() Linus Walleij
2013-10-20 22:14 ` [PATCH 2/3] gpiolib: devres: add missing headers Alexandre Courbot
2013-10-20 22:14 ` [PATCH 3/3] gpiolib: make GPIO_DEVRES depend on GPIOLIB Alexandre Courbot
2013-10-23 8:13 ` Linus Walleij
2013-10-23 8:14 ` Linus Walleij
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=1382307299-22587-2-git-send-email-acourbot@nvidia.com \
--to=acourbot@nvidia.com \
--cc=gnurou@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--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
all inboxes | Powered by JetHome®