All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zdeněk OGAR Skalák" <skalak-Bh/+Xfn7orxQjibfaplwYw@public.gmane.org>
Cc: Grover Andrew
	<andrew.grover-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: acpi=off & /proc entries
Date: Fri, 16 May 2003 11:19:25 +0200	[thread overview]
Message-ID: <3EC4AD1D.F560C85@monetplus.cz> (raw)
In-Reply-To: 3ACA40606221794F80A5670F0AF15F8427230B@pdsmsx403.ccr.corp.intel.com

[-- Attachment #1: Type: text/plain, Size: 746 bytes --]


Hi,

	here is small simple patch :-) It's against acpi-20030512-2.4.21-rc2.

	It prevents ACPI modules (button, ...) to register itself & create /proc
entries, when acpi is disabled through acpi=off. 

	Because bus.c uses acpi_disabled variable set by acpi=off, it doesn't register
/proc/acpi directory & module later registers (in his __init) it's /proc entry
just in /proc (/proc/button, ...).

	This simply returns -ENODEV if acpi_disabled & when module tries to register
via acpi_bus_register_driver (in bus.c) & as a consequence, module removes his
/proc entry :-)

	Bye
		Zdenek OGAR Skalak
-- 
Ing. Zdeněk OGAR Skalák
Monet+ a.s.
Zámecká 365
763 14 Zlín - Štípa, CZ
Tel: +420 / 577 110 411,  Fax: +420 / 577 914 557

[-- Attachment #2: acpi_off.diff --]
[-- Type: text/plain, Size: 429 bytes --]

diff -r -c old/drivers/acpi/bus.c new/drivers/acpi/bus.c
*** old/drivers/acpi/bus.c	Fri May 16 09:55:19 2003
--- new/drivers/acpi/bus.c	Fri May 16 09:58:01 2003
***************
*** 1249,1254 ****
--- 1249,1257 ----
  	if (!driver)
  		return_VALUE(-EINVAL);
  
+ 	if (acpi_disabled)
+ 		return_VALUE(-ENODEV);
+ 
  	down(&acpi_bus_drivers_lock);
  	list_add_tail(&driver->node, &acpi_bus_drivers);
  	up(&acpi_bus_drivers_lock);

  reply	other threads:[~2003-05-16  9:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-14  8:07 acpi=off & /proc entries Yu, Luming
2003-05-16  9:19 ` Zdeněk OGAR Skalák [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-05-16 20:33 Grover, Andrew
2003-05-16 17:49 Grover, Andrew
2003-05-08 16:26 FW: kernel 2.4 and bugzilla Grover, Andrew
2003-05-12 15:18 ` acpi=off & /proc entries Zdeněk OGAR Skalák

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=3EC4AD1D.F560C85@monetplus.cz \
    --to=skalak-bh/+xfn7orxqjibfaplwyw@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=andrew.grover-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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.