From patchwork Sun Mar 2 14:33:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 3749551 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: X-Original-To: patchwork-linux-pm@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 F38949F1EE for ; Sun, 2 Mar 2014 14:34:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 257B020382 for ; Sun, 2 Mar 2014 14:34:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F1E0B20374 for ; Sun, 2 Mar 2014 14:33:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753273AbaCBOdq (ORCPT ); Sun, 2 Mar 2014 09:33:46 -0500 Received: from cantor2.suse.de ([195.135.220.15]:32790 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753504AbaCBOdp (ORCPT ); Sun, 2 Mar 2014 09:33:45 -0500 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 3997D75015; Sun, 2 Mar 2014 14:33:44 +0000 (UTC) Date: Sun, 2 Mar 2014 15:33:35 +0100 From: Jean Delvare To: linux-pm@vger.kernel.org Cc: Zhang Rui , Eduardo Valentin , Guenter Roeck Subject: [PATCH] x86_pkg_temp_thermal: Do not expose as a hwmon device Message-ID: <20140302153335.0f1326b6@endymion.delvare> Organization: SUSE Linux X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; x86_64-suse-linux-gnu) MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 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 The temperature value reported by x86_pkg_temp_thermal is already reported by the coretemp driver. So, do not expose this thermal zone as a hwmon device, because it would be redundant. Signed-off-by: Jean Delvare Cc: Zhang Rui Cc: Eduardo Valentin Acked-by: Guenter Roeck --- drivers/thermal/x86_pkg_temp_thermal.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- linux-3.14-rc4.orig/drivers/thermal/x86_pkg_temp_thermal.c 2014-03-02 15:29:21.646475545 +0100 +++ linux-3.14-rc4/drivers/thermal/x86_pkg_temp_thermal.c 2014-03-02 15:29:37.568831104 +0100 @@ -68,6 +68,10 @@ struct phy_dev_entry { struct thermal_zone_device *tzone; }; +static const struct thermal_zone_params pkg_temp_tz_params = { + .no_hwmon = true, +}; + /* List maintaining number of package instances */ static LIST_HEAD(phy_dev_list); static DEFINE_MUTEX(phy_dev_list_mutex); @@ -443,7 +447,7 @@ static int pkg_temp_thermal_device_add(u thres_count, (thres_count == MAX_NUMBER_OF_TRIPS) ? 0x03 : 0x01, - phy_dev_entry, &tzone_ops, NULL, 0, 0); + phy_dev_entry, &tzone_ops, &pkg_temp_tz_params, 0, 0); if (IS_ERR(phy_dev_entry->tzone)) { err = PTR_ERR(phy_dev_entry->tzone); goto err_ret_free;