public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: yiding_wang@agilent.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: question about driver built-in kernel
Date: Fri, 18 Nov 2005 17:20:10 -0800	[thread overview]
Message-ID: <20051119012010.GC28175@kroah.com> (raw)
In-Reply-To: <08A354A3A9CCA24F9EE9BE13600CFBC501A31910@wcosmb07.cos.agilent.com>

On Thu, Nov 17, 2005 at 05:18:34PM -0700, yiding_wang@agilent.com wrote:
> We have two driver modules to support our hardware for some
> applications. Both modules worked fine as loadable modules. Now I need
> to build both drivers in kernel 2.6.11-8. I have changed configuration
> file and make file. Both drivers are built OK with kernel together.

Have a pointer to the source for these drivers?

> 1, Because both drivers were loaded as module before, the entry point
> for both driver is "init_module()". Since both drivers are built in
> kernel, the entry name is conflicting. Changing one entry point name
> will make driver built OK. However, I am concerned that loading kernel
> will not pick up the driver with changed entry point name. What is the
> best way to handle this situation?

Make your init module function static, like all other kernel drivers.

> 2, One of built-in driver requires to be loaded before the second one.
> Because these two drivers are not belong to any existing group, such
> as network, scsi, where is the best place these two driver can be
> specified for loading sequence? I checked init.d and rc* files but did
> not figure out proper place to handle the requirement.

The linker specifies the loading order.

hope this helps,

greg k-h

  reply	other threads:[~2005-11-19  1:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-18  0:18 question about driver built-in kernel yiding_wang
2005-11-19  1:20 ` Greg KH [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-11-19  1:57 yiding_wang
2005-11-19  5:37 ` Greg KH
2005-11-21 19:06 yiding_wang
2005-11-21 20:27 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051119012010.GC28175@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yiding_wang@agilent.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox