Re: Source organization for two drivers sharing coomon code

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

 



Thanks for all the answers.  The common code is mostly handling
the message passing for hardware  initialization, rings creation
and some ioctls.  drivers/message looks like a good place for this
code to live.

Subbu



From: Jan Engelhardt [mailto:[email protected]]
To: Chris Friesen [mailto:[email protected]]
Cc: Subbu Seetharaman [mailto:[email protected]], [email protected]
Sent: Fri, 27 Jul 2007 12:34:16 -0700
Subject: Re: Source organization for two drivers sharing coomon code


On Jul 27 2007 13:12, Chris Friesen wrote:
> Jan Engelhardt wrote:
>> On Jul 27 2007 10:17, Subbu Seetharaman wrote:
>> 
>> >What is the recommended way for two drivers to share common code ?
>> ><snip>...The source code for these dirvers will fit under drivers/net and
>> >drivers/scsi. But both drivers share some common code.
>
>> You could create (in total) three modules, e.g. my-common.ko,
>> my-net.ko and my-scsi.ko, of which the latter two use functions from the
>> first.
>
> Where would the common code live, in such a case? Would you just pick one of
> the two locations at random, or put it in drivers/misc or maybe lib?

Perhaps drivers/message - well I can't answer that exactly.

As far as the output object files are concerned, it is not relevant,
since they will be autoloaded anyway :)



Jan
-- 

___________________________________________________________________________________
This message, together with any attachment(s), contains confidential and proprietary information of
ServerEngines LLC and is intended only for the designated recipient(s) named above. Any unauthorized
review, printing, retention, copying, disclosure or distribution is strictly prohibited.  If you are not the
intended recipient of this message, please immediately advise the sender by reply email message and
delete all copies of this message and any attachment(s). Thank you.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux