From patchwork Tue Apr 22 06:24:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "lan,Tianyu" X-Patchwork-Id: 4028731 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D0ED49F387 for ; Tue, 22 Apr 2014 06:35:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 17C9020213 for ; Tue, 22 Apr 2014 06:35:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 451642020F for ; Tue, 22 Apr 2014 06:35:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753232AbaDVGcl (ORCPT ); Tue, 22 Apr 2014 02:32:41 -0400 Received: from mga09.intel.com ([134.134.136.24]:60097 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753150AbaDVGcb (ORCPT ); Tue, 22 Apr 2014 02:32:31 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 21 Apr 2014 23:27:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,901,1389772800"; d="scan'208";a="497160975" Received: from lantianyu-ws.sh.intel.com (HELO localhost) ([10.239.37.18]) by orsmga001.jf.intel.com with ESMTP; 21 Apr 2014 23:32:27 -0700 From: Lan Tianyu To: wsa@the-dreams.de, rjw@rjwysocki.net, mika.westerberg@linux.intel.com, awilliam@redhat.com, lenb@kernel.org Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, tianyu.lan@intel.com Subject: [Resend Patch 4/9] ACPI/Thermal: Use acpi_bus_attach_private_data() to attach private data Date: Tue, 22 Apr 2014 14:24:10 +0800 Message-Id: <1398147855-9868-5-git-send-email-tianyu.lan@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398147855-9868-1-git-send-email-tianyu.lan@intel.com> References: <1397654682-7094-1-git-send-email-tianyu.lan@intel.com> <1398147855-9868-1-git-send-email-tianyu.lan@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use acpi_bus_attach_private_data() to attach private data instead of acpi_attach_data(). Signed-off-by: Lan Tianyu Reviewed-by: Mika Westerberg --- drivers/acpi/thermal.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index c1e31a4..7ab9392 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;