All of lore.kernel.org
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: Zhao Yakui <yakui.zhao@intel.com>
Cc: linux-acpi@vger.kernel.org
Subject: Re: [PATCH]  ACPI:  Check whether cooling device exists before unregistering it
Date: Fri, 15 Feb 2008 18:31:18 -0500	[thread overview]
Message-ID: <200802151831.18533.lenb@kernel.org> (raw)
In-Reply-To: <1203035677.12873.1.camel@yakui_zhao.sh.intel.com>

applied.

thanks,
-len

On Thursday 14 February 2008 19:34, Zhao Yakui wrote:
> Subject: ACPI:  Check whether cooling device exists before unregistering it
> >From : Zhao Yakui <yakui.zhao@intel.com>
> 
> OS should check whether the cooling device exists before it is unregistered.
> If it doesn't exists, it is unnecessary to remove the sysfs link
> and call the function of thermal_cooling_device_unregister.
> 
> http://bugzilla.kernel.org/show_bug.cgi?id=9982
> 
> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
> Tested-by    : Dhaval Giani <dhaval@linux.vnet.ibm.com>
>     
> ---
>  drivers/acpi/processor_core.c |   10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> Index: linux-2.6/drivers/acpi/processor_core.c
> ===================================================================
> --- linux-2.6.orig/drivers/acpi/processor_core.c
> +++ linux-2.6/drivers/acpi/processor_core.c
> @@ -809,10 +809,12 @@ static int acpi_processor_remove(struct 
>  
>  	acpi_processor_remove_fs(device);
>  
> -	sysfs_remove_link(&device->dev.kobj, "thermal_cooling");
> -	sysfs_remove_link(&pr->cdev->device.kobj, "device");
> -	thermal_cooling_device_unregister(pr->cdev);
> -	pr->cdev = NULL;
> +	if (pr->cdev) {
> +		sysfs_remove_link(&device->dev.kobj, "thermal_cooling");
> +		sysfs_remove_link(&pr->cdev->device.kobj, "device");
> +		thermal_cooling_device_unregister(pr->cdev);
> +		pr->cdev = NULL;
> +	}
>  
>  	processors[pr->id] = NULL;
>  
> 
> 

      reply	other threads:[~2008-02-15 23:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-15  0:34 [PATCH] ACPI: Check whether cooling device exists before unregistering it Zhao Yakui
2008-02-15 23:31 ` Len Brown [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=200802151831.18533.lenb@kernel.org \
    --to=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=yakui.zhao@intel.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 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.