lkml.org 
[lkml]   [2022]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH v5 1/6] gpiolib: Introduce a helper to get first GPIO controller node
    On Tue, Apr 26, 2022 at 12:27 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
    >
    > On Thu, Apr 14, 2022 at 9:02 PM Andy Shevchenko
    > <andriy.shevchenko@linux.intel.com> wrote:
    > >
    > > Introduce a helper to get first GPIO controller node which drivers
    > > may want to use.

    > > +static inline struct fwnode_handle *gpiochip_node_get_first(struct device *dev)
    > > +{
    > > + struct fwnode_handle *fwnode;
    > > +
    > > + for_each_gpiochip_node(dev, fwnode)
    > > + return fwnode;
    > > +
    > > + return NULL;
    > > +}
    > > +
    > > #endif /* __LINUX_GPIO_DRIVER_H */
    > > --
    > > 2.35.1
    > >
    >
    > Any chance you could name it get_first_gpiochip_node()? It's static so
    > we don't have to worry about the prefix and it would make the purpose
    > more clear.

    There are two things why I prefer it as is:
    1) it's static inline, so it's part of (internal) but still exported API;
    2) it's already in my for-next branch which I would like not to
    rebase, until it's a really serious issue.

    That said, if you still insist I can rename it.

    --
    With Best Regards,
    Andy Shevchenko

    \
     
     \ /
      Last update: 2022-04-26 12:39    [W:3.034 / U:0.628 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site