lkml.org 
[lkml]   [2024]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] gpio: set device type for GPIO chips
On Wed, Feb 7, 2024 at 11:49 AM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Wed, Feb 07, 2024 at 11:45:39AM +0100, Linus Walleij wrote:
> > On Thu, Feb 1, 2024 at 5:28 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> >
> > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > >
> > > It's useful to have the device type information for those sub-devices
> > > that are actually GPIO chips registered with GPIOLIB. While at it: use
> > > the device type struct to setup the release callback which is the
> > > preferred way to use the device API.
> > >
> > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > (...=
> > > +static struct device_type gpio_dev_type = {
>
> Can you make this structure const please?
>

I have, there's a v2 on the list already.

Thanks
Bart

> > > + .name = "gpio_chip",
> > > + .release = gpiodev_release,
> > > +};
> > > + gdev->dev.type = &gpio_dev_type;
> > > gdev->dev.bus = &gpio_bus_type;
> > > gdev->dev.parent = gc->parent;
> >
> > Looks good to me (TM) but we should run this by Greg so he get the chance
> > to chime in, I doubt he will see it on LKML.
>
> Yes thanks, I wouldn't have caught it...
>
> greg k-h

\
 
 \ /
  Last update: 2024-05-27 14:53    [W:1.532 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site