From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Kent Gibson <warthog618@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] gpiolib: un-inline gpiod_request_user()
Date: Fri, 9 Sep 2022 16:45:37 +0300 [thread overview]
Message-ID: <YxtDgUbdJnP3RHf7@smile.fi.intel.com> (raw)
In-Reply-To: <20220909121329.42004-2-brgl@bgdev.pl>
On Fri, Sep 09, 2022 at 02:13:28PM +0200, Bartosz Golaszewski wrote:
> Pull this bit of code into gpiolib.c as we're soon be calling certain
> symbols static in this compilation unit.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
> ---
> drivers/gpio/gpiolib.c | 11 +++++++++++
> drivers/gpio/gpiolib.h | 12 +-----------
> 2 files changed, 12 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> index cc9c0a12259e..6768734b9e15 100644
> --- a/drivers/gpio/gpiolib.c
> +++ b/drivers/gpio/gpiolib.c
> @@ -2009,6 +2009,17 @@ int gpiod_request(struct gpio_desc *desc, const char *label)
> return ret;
> }
>
> +int gpiod_request_user(struct gpio_desc *desc, const char *label)
> +{
> + int ret;
> +
> + ret = gpiod_request(desc, label);
> + if (ret == -EPROBE_DEFER)
> + ret = -ENODEV;
> +
> + return ret;
> +}
> +
> static bool gpiod_free_commit(struct gpio_desc *desc)
> {
> bool ret = false;
> diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h
> index d900ecdbac46..b35deb08a7f5 100644
> --- a/drivers/gpio/gpiolib.h
> +++ b/drivers/gpio/gpiolib.h
> @@ -179,19 +179,9 @@ struct gpio_desc {
> #define gpiod_not_found(desc) (IS_ERR(desc) && PTR_ERR(desc) == -ENOENT)
>
> int gpiod_request(struct gpio_desc *desc, const char *label);
> +int gpiod_request_user(struct gpio_desc *desc, const char *label);
> void gpiod_free(struct gpio_desc *desc);
>
> -static inline int gpiod_request_user(struct gpio_desc *desc, const char *label)
> -{
> - int ret;
> -
> - ret = gpiod_request(desc, label);
> - if (ret == -EPROBE_DEFER)
> - ret = -ENODEV;
> -
> - return ret;
> -}
> -
> int gpiod_configure_flags(struct gpio_desc *desc, const char *con_id,
> unsigned long lflags, enum gpiod_flags dflags);
> int gpio_set_debounce_timeout(struct gpio_desc *desc, unsigned int debounce);
> --
> 2.34.1
>
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2022-09-09 13:47 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-09 12:13 [PATCH 0/2] gpiolib: export the consumer's PID to user-space Bartosz Golaszewski
2022-09-09 12:13 ` [PATCH 1/2] gpiolib: un-inline gpiod_request_user() Bartosz Golaszewski
2022-09-09 13:45 ` Andy Shevchenko [this message]
2022-09-10 14:51 ` Kent Gibson
2022-09-09 12:13 ` [PATCH 2/2] gpiolib: cdev: export the consumer's PID Bartosz Golaszewski
2022-09-09 13:45 ` Andy Shevchenko
2022-09-09 13:48 ` Andy Shevchenko
2022-09-09 19:18 ` Bartosz Golaszewski
2022-09-10 14:52 ` Kent Gibson
2022-09-12 8:52 ` Bartosz Golaszewski
2022-09-12 9:53 ` Kent Gibson
2022-09-12 9:56 ` Bartosz Golaszewski
2022-09-13 2:12 ` Kent Gibson
2022-09-13 8:54 ` Bartosz Golaszewski
2022-09-13 14:28 ` Kent Gibson
2022-09-13 14:35 ` Bartosz Golaszewski
2022-09-13 14:55 ` Kent Gibson
2022-09-13 15:58 ` Bartosz Golaszewski
2022-09-13 16:17 ` Kent Gibson
2022-09-13 17:07 ` Andy Shevchenko
2022-09-13 19:35 ` Bartosz Golaszewski
2022-09-14 1:00 ` Kent Gibson
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=YxtDgUbdJnP3RHf7@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viresh.kumar@linaro.org \
--cc=warthog618@gmail.com \
/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).