Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp883096yba; Thu, 18 Apr 2019 11:09:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzIliu9t8sNoHrDF2p+kwt8fvi1HJ/xLOf1FhTO4JTxo7Kq2VUDsfZ4/hbYHuAegVWGQ0So X-Received: by 2002:a63:c706:: with SMTP id n6mr81239026pgg.310.1555610959877; Thu, 18 Apr 2019 11:09:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555610959; cv=none; d=google.com; s=arc-20160816; b=C5AkpH2xyjDk50QVY268nBIKrsZl1BDMWPf5FevYsxtUdC/nJL9ZAWNoO6OJ/rnkoP R8SSSar85KDiX6qiMeTIfgWX5gBODbkkrAwBAhBm52HaFB8ZW7hpS2VF0MbVKNFq8GZ9 1uvjCuOEpZaXoYIS9SunsavBXWP5jNqHIDvdfgp4HrN8DNoHp0xLMUoUG4P3ajOJoFIs IaA1YhYzkPpZXRPw1SYbEoftdhZ2Fww6mO4ou7IC8fkA294kLJmoBcWmOxWoAyTifMcu SO+MfNHBfCfFuM3mkUwbz4eEFlE5zs80/xuUVy4X9OQdVpCR0WqgP57KGS8cXYUpgKVM dAkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Q5EFrtflRbb4/QjZ4kggLuw025r7+IGKkcHzh6shwV0=; b=POp8TsDxVot1gIpWHh3R2YeEF2PbRS7Z8NtnJWw46so8/r2e9S+mJCByEeu/LRxsrI pZlrLzLpD9lzQZf+kdxgHyuQbMD+TArPsoMJnO1hgB9yjOOpoNRheoX7hGpmmK1yVZnB wiDqMlRFBa5W0rAJ4w7QcVysFbyWaMoAa2ACjW2peB3z/WSV+ab1jtX1PSxQK7xvIa42 f9WcviXd8oTXjdw0gsN1tGq6dllZMPSt/iCm7dHJfmVysyQ16BmwhKX9tuiNVDIrrw1h jbLxgX3U32ECwz1oiZ717nC9OsiOPMvgXr7BN/1BOBHotNoSr9+0nH1tDAypbQ0vTMCu 0Z+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wOZs6qTq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 125si2362616pgc.220.2019.04.18.11.09.04; Thu, 18 Apr 2019 11:09:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wOZs6qTq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391617AbfDRSHW (ORCPT + 99 others); Thu, 18 Apr 2019 14:07:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:37522 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391591AbfDRSHU (ORCPT ); Thu, 18 Apr 2019 14:07:20 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EAE6E218A1; Thu, 18 Apr 2019 18:07:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555610839; bh=nG4pVa9jMLB6NoMhhciXMQjdQm5NXSzrGTo7He0y9yg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wOZs6qTqqwjWeeMKYAkyFnZ/CV9zZpKsmZ7Fx3m8SxBuJM4MBbubExZneydqcMm1m QUpSb6tCJTwGfnlI+7Zx7kCbxoo5OH/Fhr7X0MUgR0zGEwzW74R4NKZVqQE4hg0WoB 8DrT7pD2ZMoeV8kLne9EDhcib2J2ZC/xDBvbwkug= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matthew Garrett , Zhang Rui , Sasha Levin Subject: [PATCH 4.9 11/50] thermal/int340x_thermal: fix mode setting Date: Thu, 18 Apr 2019 19:57:22 +0200 Message-Id: <20190418160424.145484894@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190418160422.455656724@linuxfoundation.org> References: <20190418160422.455656724@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 396ee4d0cd52c13b3f6421b8d324d65da5e7e409 ] int3400 only pushes the UUID into the firmware when the mode is flipped to "enable". The current code only exposes the mode flag if the firmware supports the PASSIVE_1 UUID, which not all machines do. Remove the restriction. Signed-off-by: Matthew Garrett Signed-off-by: Zhang Rui Signed-off-by: Sasha Levin --- drivers/thermal/int340x_thermal/int3400_thermal.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/int340x_thermal/int3400_thermal.c b/drivers/thermal/int340x_thermal/int3400_thermal.c index 0beed2899163..d4c374cc4f74 100644 --- a/drivers/thermal/int340x_thermal/int3400_thermal.c +++ b/drivers/thermal/int340x_thermal/int3400_thermal.c @@ -285,10 +285,9 @@ static int int3400_thermal_probe(struct platform_device *pdev) platform_set_drvdata(pdev, priv); - if (priv->uuid_bitmap & 1 << INT3400_THERMAL_PASSIVE_1) { - int3400_thermal_ops.get_mode = int3400_thermal_get_mode; - int3400_thermal_ops.set_mode = int3400_thermal_set_mode; - } + int3400_thermal_ops.get_mode = int3400_thermal_get_mode; + int3400_thermal_ops.set_mode = int3400_thermal_set_mode; + priv->thermal = thermal_zone_device_register("INT3400 Thermal", 0, 0, priv, &int3400_thermal_ops, &int3400_thermal_params, 0, 0); -- 2.19.1