From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDFBEC43381 for ; Sat, 30 Mar 2019 01:10:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9F263205C9 for ; Sat, 30 Mar 2019 01:10:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553908242; bh=GHt7RPK5STg/MjAaQD62mPmQocY0GJBTY4ZmOqLbUfA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=H92jzv5JJva1cUAPrV3y2+M47D1UUC1Ohj0+Yo+JF6etzVsoGCjRBcTzizcTRgcie lerm9B4VFXLgJW+O+alIVD4jqx+5UdTXctBCudjlKl6wht9x5e3n6yCKvhvyofEv9N x4isU72urtsd9YuOJBw5LC80d5gToNjbpBLhxUrM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730747AbfC3Av3 (ORCPT ); Fri, 29 Mar 2019 20:51:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:58066 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730698AbfC3Av0 (ORCPT ); Fri, 29 Mar 2019 20:51:26 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D5962206DD; Sat, 30 Mar 2019 00:51:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553907085; bh=GHt7RPK5STg/MjAaQD62mPmQocY0GJBTY4ZmOqLbUfA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Iqu2TJt4qMUNd1otFEOXgm2Qr2hv3Hi7+A4Z0lwIEyNi5mZlZzKVxeQK3GACdWmak tTrjJCrfuCEgFAV+IlQVb+1MdmXuRRwmNWbBRgfVNE5NXLBN5XqtPhrCw1KqDvK6eZ vmesfmyvOc0XbXE5RqjV4mvo6YmCV077e9WqDl5w= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Matthew Garrett , Matthew Garrett , Zhang Rui , Sasha Levin , linux-pm@vger.kernel.org Subject: [PATCH AUTOSEL 5.0 24/67] thermal/int340x_thermal: fix mode setting Date: Fri, 29 Mar 2019 20:50:04 -0400 Message-Id: <20190330005047.25998-24-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190330005047.25998-1-sashal@kernel.org> References: <20190330005047.25998-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Matthew Garrett [ 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/intel/int340x_thermal/int3400_thermal.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c index e0f39cacbc18..5f3ed24e26ec 100644 --- a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c @@ -313,10 +313,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