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.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 96328C10F11 for ; Wed, 24 Apr 2019 17:20:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 663FB205ED for ; Wed, 24 Apr 2019 17:20:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556126431; bh=nG4pVa9jMLB6NoMhhciXMQjdQm5NXSzrGTo7He0y9yg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=aofKep1FlXYlWf78PUtAWIL+xCkGNXqZdZSbUgO9T0E7aUs7FeaYy7ZWZG7Bew2PW v8XBKdnemd/bsyZB2SN2T3VzgAugt3QpwFySg6dCHAPxtaI6jnhAapZA92auPsu+Xw pSN9eGDeWZg+a0pQp8u80V+lQJoVhzdzW8K/nI2E= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389176AbfDXRUa (ORCPT ); Wed, 24 Apr 2019 13:20:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:45766 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389168AbfDXRU2 (ORCPT ); Wed, 24 Apr 2019 13:20:28 -0400 Received: from localhost (62-193-50-229.as16211.net [62.193.50.229]) (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 001F6205ED; Wed, 24 Apr 2019 17:20:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556126427; bh=nG4pVa9jMLB6NoMhhciXMQjdQm5NXSzrGTo7He0y9yg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G7oB4f/i8WR2tRZRrs+wMzwJsDMVqXwFJxbb26kpwllyHkZwcfPo1PSJAHNSj6Hjb YpHKy89/spc03TWRXS8X20q+yyyb6MDlkASGR00+4wouDbjkvRUz5PsdF3T9F2Klwm 3LNErhx8AdlRDPcRpwzyGzijr907Q1N9em0hog30= 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.4 107/168] thermal/int340x_thermal: fix mode setting Date: Wed, 24 Apr 2019 19:09:11 +0200 Message-Id: <20190424170929.896293858@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190424170923.452349382@linuxfoundation.org> References: <20190424170923.452349382@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