mbox series

[v1,0/3] gpiolib: cleanups WRT GPIO device handling

Message ID 20230307182557.42215-1-andriy.shevchenko@linux.intel.com
Headers show
Series gpiolib: cleanups WRT GPIO device handling | expand

Message

Andy Shevchenko March 7, 2023, 6:25 p.m. UTC
A few cleanups to GPIO device handling in the library code.

Andy Shevchenko (3):
  gpiolib: Access device's fwnode via dev_fwnode()
  gpiolib: Get rid of gpio_bus_match() forward declaration
  gpiolib: Move gpiodevice_*() to gpiodev namespace

 drivers/gpio/gpiolib.c | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

Comments

Bartosz Golaszewski March 8, 2023, 10:50 a.m. UTC | #1
On Tue, Mar 7, 2023 at 7:25 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> A few cleanups to GPIO device handling in the library code.
>
> Andy Shevchenko (3):
>   gpiolib: Access device's fwnode via dev_fwnode()
>   gpiolib: Get rid of gpio_bus_match() forward declaration
>   gpiolib: Move gpiodevice_*() to gpiodev namespace
>
>  drivers/gpio/gpiolib.c | 38 +++++++++++++++++++-------------------
>  1 file changed, 19 insertions(+), 19 deletions(-)
>
> --
> 2.39.1
>

I applied the first two patches, for the third I have a comment.

Bart
Linus Walleij March 9, 2023, 1:58 p.m. UTC | #2
On Tue, Mar 7, 2023 at 7:25 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> GPIO device's fwnode should be accessed via dev_fwnode().
> Make sure that gpiochip_setup_dev() follows that.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
Linus Walleij March 9, 2023, 1:58 p.m. UTC | #3
On Tue, Mar 7, 2023 at 7:25 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> There is nothing specific about gpio_bus_match(), so we may
> simply move it to the top of the file and get rid of forward
> declaration.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij