All of lore.kernel.org
 help / color / mirror / Atom feed
From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: using sysctl.conf for module that initialize in early bootup
Date: Fri, 5 Aug 2016 12:28:56 +0200	[thread overview]
Message-ID: <20160805102856.GA31227@kroah.com> (raw)
In-Reply-To: <CAPiThYr9AWpUBe9kORiRva3y1baGNh7VF+s_b5h1OEpnpGEu_w@mail.gmail.com>

On Fri, Aug 05, 2016 at 02:52:01PM +0530, Pankaj Gupta wrote:
> Dear All,
> 
> I am trying to introduce a flag which controls probe of a driver that
> initialize in device_initcall(). I want to use a flag, if the flag is true
> driver will be initialed and if its false then probe will return without
> registering the driver. The value of flag can be changed at runtime and that
> should persist after reboot.

"persist after reboot"?  Why do you want that?  kernel drivers can't
write to any filesystems, you should control the kernel from userspace.
Only load your driver if you "know" you want to load it and have it
control the hardware, no need to do anything strange in the kernel for
something like this at all.

good luck!

greg k-h

      reply	other threads:[~2016-08-05 10:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-05  9:22 using sysctl.conf for module that initialize in early bootup Pankaj Gupta
2016-08-05 10:28 ` Greg KH [this message]

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=20160805102856.GA31227@kroah.com \
    --to=greg@kroah.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.