lkml.org 
[lkml]   [2012]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] can: rename LED trigger name on netdev renames
On Tue, Sep 11, 2012 at 09:13:14AM +0200, Fabio Baltieri wrote:
> Hi Oliver,
>
> On Tue, Sep 11, 2012 at 07:42:19AM +0200, Oliver Hartkopp wrote:
> > On 10.09.2012 22:08, Kurt Van Dijck wrote:
> > > But the initial name must have been set properly already in that case...
> >
> > Yes it is.
> >
> > See register_netdevice()
> >
> > http://lxr.linux.no/#linux+v3.5.3/net/core/dev.c#L5453
> >
> >
> > at the end NETDEV_REGISTER is notified:
> >
> > http://lxr.linux.no/#linux+v3.5.3/net/core/dev.c#L5552
> >
> > So it would be pretty elegant to create the LED trigger name in the notifier.
> > This would allow to remove that code at the current init function too.
>
> That would indeed be elegant, but in the current implementation
> triggers only works for supported drivers, while putting registration in
> the notifier would imply to use it also in unsupported ones, where you
> would get a trigger which never triggers.

I note here another problem: any candev rename causes the notifier to
rename its led triggers, but some have it never registered.

Oliver, your approach is the better. It took a bit for me to see ...
but this requires a bit of reverting in the drivers.

Kind regards,
Kurt


\
 
 \ /
  Last update: 2012-09-12 10:01    [W:0.087 / U:7.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site