All of lore.kernel.org
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: akpm@linux-foundation.org
Cc: linux-acpi@vger.kernel.org, trenn@suse.de
Subject: Re: [patch 04/13] Exit ACPI processor module gracefully if acpi is disabled
Date: Fri, 9 Feb 2007 00:47:24 -0500	[thread overview]
Message-ID: <200702090047.25044.lenb@kernel.org> (raw)
In-Reply-To: <200702060010.l160ADKR003729@shell0.pdx.osdl.net>

Why not simply check acpi_disabled, like other drivers do?

thanks,
-Len

On Monday 05 February 2007 19:09, akpm@linux-foundation.org wrote:
> From: Thomas Renninger <trenn@suse.de>
> 
> Signed-off-by: Thomas Renninger <trenn@suse.de>
> Cc: Len Brown <lenb@kernel.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  drivers/acpi/processor_core.c |   13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff -puN drivers/acpi/processor_core.c~exit-acpi-processor-module-gracefully-if-acpi-is-disabled drivers/acpi/processor_core.c
> --- a/drivers/acpi/processor_core.c~exit-acpi-processor-module-gracefully-if-acpi-is-disabled
> +++ a/drivers/acpi/processor_core.c
> @@ -994,6 +994,8 @@ void acpi_processor_uninstall_hotplug_no
>   * ACPI, but needs symbols from this driver
>   */
>  
> +static int processor_driver_registered;
> +
>  static int __init acpi_processor_init(void)
>  {
>  	int result = 0;
> @@ -1019,6 +1021,8 @@ static int __init acpi_processor_init(vo
>  		return result;
>  	}
>  
> +	processor_driver_registered = 1;
> +
>  	acpi_processor_install_hotplug_notify();
>  
>  	acpi_thermal_cpufreq_init();
> @@ -1035,12 +1039,13 @@ static void __exit acpi_processor_exit(v
>  
>  	acpi_thermal_cpufreq_exit();
>  
> -	acpi_processor_uninstall_hotplug_notify();
> -
> -	acpi_bus_unregister_driver(&acpi_processor_driver);
> +	if (processor_driver_registered) {
> +		acpi_processor_uninstall_hotplug_notify();
>  
> -	remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir);
> +		acpi_bus_unregister_driver(&acpi_processor_driver);
>  
> +		remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir);
> +	}
>  	return;
>  }
>  
> _
> -
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  reply	other threads:[~2007-02-09  5:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-06  0:09 [patch 04/13] Exit ACPI processor module gracefully if acpi is disabled akpm
2007-02-09  5:47 ` Len Brown [this message]
2007-02-09  8:34   ` Thomas Renninger
2007-03-07  8:00     ` Len Brown
2007-03-08 13:20       ` Thomas Renninger

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=200702090047.25044.lenb@kernel.org \
    --to=lenb@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=trenn@suse.de \
    /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.