lkml.org 
[lkml]   [2017]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2 net-next 2/8] net: hns3: Add support of the HNAE3 framework
> > > +subsys_initcall(hnae3_init);
> >
> > And the point of this is?
> >
> > Andrew
> This looks weird but not sure how we could have made sure HNAE is available before other
> 2 drivers could have loaded. Changing into module_init() means two other modules (dependent
> upon hnae) if loaded first will experience load time linking problems. Do you think this
> is okay?

Often the best way to decide if something is sensible is to see if
lots of other drivers do the same. Can you point to other drivers
doing this?

depmod/modprobe will actually sort this out for you. depmod looks at
the symbols exported and required for each module and builds a
dependency tree. When you modprobe a driver, it looks at the
dependency tree, and loads any drivers needed in order to fulfil the
dependencies.

Andrew

\
 
 \ /
  Last update: 2017-06-17 14:11    [W:0.053 / U:1.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site