Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp901771yba; Thu, 18 Apr 2019 11:29:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzcgCrmkOkvt/cJ3up9L6LThyUnvKTbwsu4wGshSSeXgSokRsVvkI+Fl0dcDIH4JeCge82G X-Received: by 2002:a17:902:b10c:: with SMTP id q12mr96875590plr.254.1555612170281; Thu, 18 Apr 2019 11:29:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555612170; cv=none; d=google.com; s=arc-20160816; b=rchvGkmAEUl1ha+xW+6WQRKmu5E9We/56dK28wjsDgNn6yywwdNN/lLu1DpbTtVjQ4 dzP5W5QXT88JP7+rDqZAzOpSNqFG00lVBadiMfqX1vSXtdBYhzHmm3KDIBzjAot38/SP FQDWakvweHXmtnttnCfYleeO/V58vWWYQsb1ZfYhrxHXzvF8xZlbW3krX6UtWnlvMqNO OEGE6oCNImZhxve8ej7exxtGj9kMOKEqkDqKFy//wHlifGc9wGFQkMQu2eoKtlCDfmZA 5EMy9K/HbO12K+eBYyi5FS4of7dAv5vdjSDqJ8WpJxvmbvMQXagjdXXyvxYwrW5iXPCx bitg== 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=vAwYdnfH32TaFJ8wSvbKfiFokgm3nLUYX3htQvTh2P0=; b=EEKnOxpcAzoftmAGtSJcvDWArIMXLTpEow22mkjhjdDro3NdzNNx3HWa70laWukmqm FIrhD8D2IwFUrBb0vcWfAsgLdXpZKhhwAJ9zapkU7qbPHsryI6uv5dEX5fRwVNzH5/fb XyGcduagVgOsM1KdLNgSqiWyCZtp/du1wCoamehHQ58Ep2JXiokir2ZHEbOW8ylOCzQb SYLOGEfhi3Tnze4E+JCRHwsUC8WWPWDgHBupq3kT94hFXJBGXyaqLf/F3C6GPlHZmr3L SzaBEESez2ZkHHOWpP5Cu7JbsYvjlFqBTEyAI6yk1ePrJjcXCQ2P+W5DeYvqFwGRhtbu iRdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="UqgsU/6O"; 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 d3si2984909pfc.278.2019.04.18.11.29.15; Thu, 18 Apr 2019 11:29:30 -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="UqgsU/6O"; 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 S2390419AbfDRS23 (ORCPT + 99 others); Thu, 18 Apr 2019 14:28:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:60056 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390922AbfDRSD0 (ORCPT ); Thu, 18 Apr 2019 14:03:26 -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 49436218A6; Thu, 18 Apr 2019 18:03:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555610605; bh=+0inN8gUe2FylcsDvIjfRKuStoWFDo7sUr9OEPrnYAI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UqgsU/6O9NxiviuTG1jZdTdnMZgzCmHCqYiFOlm+cq694QgHkYp4lMg2orAM5K6eO YSz1TkdATmFXszXAR7qCfC6nWBZZUJrBfI+ksFPbPKrlN5oJQJAwF6dPqLqE3EHZfq VttR0yZid/AwYlC+v9YWgqi/6UMBdE5iEEmNDa2U= 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.14 15/92] thermal/int340x_thermal: fix mode setting Date: Thu, 18 Apr 2019 19:56:33 +0200 Message-Id: <20190418160431.693058597@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190418160430.325165109@linuxfoundation.org> References: <20190418160430.325165109@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 34dc4d6dda66..4a20f4d47b1d 100644 --- a/drivers/thermal/int340x_thermal/int3400_thermal.c +++ b/drivers/thermal/int340x_thermal/int3400_thermal.c @@ -316,10 +316,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