Re: [PATCH v4 16/17] usb: simplify usbport trigger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jun 16, 2018 at 11:55:37PM +0200, Uwe Kleine-König wrote:
> Hello Greg,
> 
> On Sat, Jun 16, 2018 at 09:58:07AM +0200, Greg KH wrote:
> > On Fri, Jun 15, 2018 at 10:54:45PM +0200, Jacek Anaszewski wrote:
> > > On 06/14/2018 11:16 PM, Uwe Kleine-König wrote:
> > > > --- a/drivers/usb/core/ledtrig-usbport.c
> > > > +++ b/drivers/usb/core/ledtrig-usbport.c
> > > > @@ -113,11 +113,17 @@ static ssize_t usbport_trig_port_store(struct device *dev,
> > > >   static struct attribute *ports_attrs[] = {
> > > >   	NULL,
> > > >   };
> > > > +
> > 
> > Ok, that looks nice...
> > 
> > > >   static const struct attribute_group ports_group = {
> > > >   	.name = "ports",
> > > >   	.attrs = ports_attrs,
> > > >   };
> > > > +static const struct attribute_group *ports_groups[] = {
> > > > +	&ports_group,
> > > > +	NULL
> > > > +};
> > 
> > No extra line there?
> 
> In the patch as I sent, I kept the separating empty line, see below.
> 
> > And what about the ATTRIBUTE_GROUPS() macro?
> 
> I tried that first, but this doesn't provide .name and later in the file
> ports_group.name is used in usbport_trig_add_port(), so I thought I
> cannot simply drop it.

Ah, you are right, yes, nevermind, you can't use that macro, sorry.

greg k-h



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux