mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lan Tianyu <tianyu.lan@intel.com>
To: wsa@the-dreams.de, rjw@rjwysocki.net,
	mika.westerberg@linux.intel.com, awilliam@redhat.com,
	lenb@kernel.org
Cc: Lan Tianyu <tianyu.lan@intel.com>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-acpi@vger.kernel.org
Subject: [Patch V3 3/5] ACPI/Thermal: Use acpi_bus_attach_private_data() to attach private data
Date: Tue, 20 May 2014 20:59:22 +0800	[thread overview]
Message-ID: <1400590764-11108-4-git-send-email-tianyu.lan@intel.com> (raw)
In-Reply-To: <1400590764-11108-1-git-send-email-tianyu.lan@intel.com>

Use acpi_bus_attach_private_data() to attach private data
instead of acpi_attach_data().

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
---
 drivers/acpi/thermal.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index c1e31a4..ae195fd 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -925,13 +925,10 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz)
 	if (result)
 		return result;
 
-	status = acpi_attach_data(tz->device->handle,
-				  acpi_bus_private_data_handler,
-				  tz->thermal_zone);
-	if (ACPI_FAILURE(status)) {
-		pr_err(PREFIX "Error attaching device data\n");
+	status =  acpi_bus_attach_private_data(tz->device->handle,
+					       tz->thermal_zone);
+	if (ACPI_FAILURE(status))
 		return -ENODEV;
-	}
 
 	tz->tz_enabled = 1;
 
@@ -946,7 +943,7 @@ static void acpi_thermal_unregister_thermal_zone(struct acpi_thermal *tz)
 	sysfs_remove_link(&tz->thermal_zone->device.kobj, "device");
 	thermal_zone_device_unregister(tz->thermal_zone);
 	tz->thermal_zone = NULL;
-	acpi_detach_data(tz->device->handle, acpi_bus_private_data_handler);
+	acpi_bus_detach_private_data(tz->device->handle);
 }
 
 
-- 
1.8.3.1


  parent reply	other threads:[~2014-05-20 13:09 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-20 12:59 [Patch V3 0/5] I2C ACPI operation region handler Lan Tianyu
2014-05-20 12:59 ` [Patch V3 1/5] ACPICA: Export acpi_buffer_to_resource symbol Lan Tianyu
2014-05-20 21:24   ` Rafael J. Wysocki
2014-05-21  2:06     ` Lan Tianyu
2014-05-20 12:59 ` [Patch V3 2/5] ACPI: Add acpi_bus_attach_private_data() to facilitate to attach data to ACPI handle Lan Tianyu
2014-05-20 12:59 ` Lan Tianyu [this message]
2014-05-20 12:59 ` [Patch V3 4/5] I2C/ACPI: Add i2c ACPI operation region support Lan Tianyu
2014-06-06 22:48   ` Rafael J. Wysocki
2014-06-09  7:56     ` Mika Westerberg
2014-06-27 11:03   ` Wolfram Sang
2014-05-20 12:59 ` [Patch V3 5/5] I2C/ACPI: Clean up I2C ACPI code and Add CONFIG_I2C_ACPI config Lan Tianyu
2014-06-27 11:03   ` Wolfram Sang
2014-06-30  1:32     ` Lan Tianyu
2014-05-20 21:25 ` [Patch V3 0/5] I2C ACPI operation region handler Rafael J. Wysocki
2014-05-21  2:16   ` Lan Tianyu
2014-05-30  6:00 ` Lan Tianyu
2014-05-30 12:24   ` Rafael J. Wysocki
2014-05-30 12:10     ` Wolfram Sang
2014-05-30 12:37       ` Lan Tianyu
2014-06-06 12:28         ` Wolfram Sang
2014-06-06 22:42           ` Rafael J. Wysocki
2014-06-24  7:02       ` Lan Tianyu

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=1400590764-11108-4-git-send-email-tianyu.lan@intel.com \
    --to=tianyu.lan@intel.com \
    --cc=awilliam@redhat.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=wsa@the-dreams.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®