Re: [patch 04/13] Exit ACPI processor module gracefully if acpi is disabled

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

 



On Fri, 2007-02-09 at 00:47 -0500, Len Brown wrote:
> Why not simply check acpi_disabled, like other drivers do?
> 
See comment from Dominik when I sent something similar some time ago:
http://marc.theaimsgroup.com/?l=linux-acpi&m=114563882012355&w=2

     Thomas

> thanks,
> -Len
> 
> On Monday 05 February 2007 19:09, akpm@xxxxxxxxxxxxxxxxxxxx wrote:
> > From: Thomas Renninger <trenn@xxxxxxx>
> > 
> > Signed-off-by: Thomas Renninger <trenn@xxxxxxx>
> > Cc: Len Brown <lenb@xxxxxxxxxx>
> > Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> > ---
> > 
> >  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@xxxxxxxxxxxxxxx
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > 

-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux