[lkml]   [2015]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] ALSA: aoa: convert bus code to use dev_groups
At Fri, 29 May 2015 17:49:06 +0200,
Quentin Lambert wrote:
> On 28/05/2015 17:01, Takashi Iwai wrote:
> >>> Also, it'd be better to move ATTRIBUTE_GROUPS(soundbus_dev) into
> >>> soundbus/sysfs.c, and make it this global instead of
> >>> soundbus_dev_attrs[].
> >> Ok, I need to find a nice way to do that because ATTRIBUTE_GROUPS
> >> declares the
> >> structure as static.
> >
> > If it results in an ungly code, it's fine with the original code,
> > too. But, maybe with a comment indicating that xxx_dev_attrs[] is
> > defined in xxx.c.
> >
> >
> Since sound/aoa/soundbus/sysfs is small, a solution would be
> to merge sound/aoa/soundbus/sysfs.c and sound/aoa/soundus/core.c.
> Moreover all 172 other usages of the ATTRIBUTE_GROUPS macro
> define the struct attribute *xxx_attrs[] in the same file
> they assign the .dev_groups field.
> I'm not sure about this change as it seems way more important than
> adding a comment line as you suggested.

Not "important" but more "radical", I'd say.

> Should I send a patch merging these two files?

I don't think it's worth. This is a fairly old hardware, thus the
code isn't so actively used/maintained. Unless it looks too ugly, we
shouldn't touch too many things just for refactoring.

So, go for the way to have a minimum change.



 \ /
  Last update: 2015-05-29 18:41    [W:0.050 / U:9.280 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site