linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhang Rui <rui.zhang@intel.com>
To: Lv Zheng <lv.zheng@intel.com>
Cc: Linux ACPI <linux-acpi@vger.kernel.org>,
	Len Brown <len.brown@intel.com>,
	Robert Moore <robert.moore@intel.com>,
	Ying Huang <ying.huang@intel.com>
Subject: Re: [PATCH] ACPI: Add _UID support for ACPI devices.
Date: Thu, 27 Sep 2012 09:33:28 +0800	[thread overview]
Message-ID: <1348709608.10877.271.camel@rui.sh.intel.com> (raw)
In-Reply-To: <3f02ff942122d086c4d6e44a9ffa9269300675b3.1348736272.git.lv.zheng@intel.com>

On 四, 2012-09-27 at 09:17 +0800, Lv Zheng wrote:
> The _UID object is optional, but is required when the device has no
> other way to report a persistent unique device ID.
> This patch is required for ACPI 5.0 ACPI enumerated IP cores.
> 

> Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>

> ---
>  drivers/acpi/scan.c |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
> index d730a93..bb7fe47 100644
> --- a/drivers/acpi/scan.c
> +++ b/drivers/acpi/scan.c
> @@ -327,6 +327,8 @@ static void acpi_device_release(struct device *dev)
>  	struct acpi_device *acpi_dev = to_acpi_device(dev);
>  
>  	acpi_free_ids(acpi_dev);
> +	if (acpi_dev->pnp.unique_id)
> +		kfree(acpi_dev->pnp.unique_id);
>  	kfree(acpi_dev);
>  }
>  
> @@ -1162,6 +1164,9 @@ static void acpi_device_set_id(struct acpi_device *device)
>  			device->pnp.bus_address = info->address;
>  			device->flags.bus_address = 1;
>  		}
> +		if (info->valid & ACPI_VALID_UID) {
> +			device->pnp.unique_id = kstrdup(info->unique_id.string, GFP_KERNEL);
> +		}
>  
>  		kfree(info);
>  


--
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:[~2012-09-27  1:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-27  1:17 [PATCH] ACPI: Add _UID support for ACPI devices Lv Zheng
2012-09-27  1:33 ` Zhang Rui [this message]
2012-09-27  1:40 ` [PATCH] ACPI: Add identification objects' user interface Lv Zheng
2012-09-27  1:45   ` Zhang Rui
2012-09-27  5:05     ` Zheng, Lv
2012-09-27  5:02 ` [RESEND PATCH] ACPI: Add _UID support for ACPI devices Lv Zheng
2012-09-28  0:39 ` [PATCH v2 0/2] ACPI: Add userland visibility for identification objects Lv Zheng
2012-09-28  0:40   ` [PATCH v2 1/2] ACPI: Add _UID support for ACPI devices Lv Zheng
2012-09-28  0:40   ` [PATCH v2 2/2] ACPI: Add identification objects' user interface Lv Zheng

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=1348709608.10877.271.camel@rui.sh.intel.com \
    --to=rui.zhang@intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=lv.zheng@intel.com \
    --cc=robert.moore@intel.com \
    --cc=ying.huang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).