Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4829393pxj; Wed, 9 Jun 2021 02:56:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeFKAFhjrmrhRA2GxZjMVIcm1wB7NDX0BBEarUgJGXjz+A9Q2As9bWF8mLZsWSA1JtY3Q3 X-Received: by 2002:a02:c6c2:: with SMTP id r2mr20138627jan.63.1623232590979; Wed, 09 Jun 2021 02:56:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623232590; cv=none; d=google.com; s=arc-20160816; b=aA7NQH10tk+mIfh/BAQiTdAg4CotXB4n6ij75zAd6Edl6R4IcNvkcaeV7v2Y7JD1v9 kg/5fkmEaRneDQ8mhfDCRdIiNRocolOXteAaxp5W+28ReXxZAZQuwZgMtQ+Zozzw1vbl srgoHFFMQ2ilPF9nBqgQO0H8Y172WQn4OZxPGnXONdXtKg/PLvRYk6xYzioa5UU+uOH5 5OhJW4zGmntLPNKTvVeGq80Sr+5bPfrZF9X6OxJGnzljvld2utcp5iOYH6EBxjoV/Rpq 1LQh1u7dIb9T3CoaFjZ96dhhAiSKQTJ+/q2OoXSCXCH45aVG77FMU2KzUiHFvZzosdxh 7NaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jcSbIYrnWIi9zKwVI5R5IrdebKgbkDGXRowKy/B3EBg=; b=lPMea8xGurog8gXjzoU7/NyPlNbQN/s9YjZ6LV/g0qqT1y5TIzlRni6APYtUiCAUry KAmgE0eOvXCMl8CKIy4LgDFHYYpIZvc0EmgD9fziubJQr0X8e45Nwio/6BCRvzEUiNyk Xaa1pY0h7V7o2KRRWpSDj8NTJgezuWtQ+J+AMElwsUa+rvNqhNG5F9e0vtTLLc4/Xy8S EdNwQLjz5xZDgprRzGf8Z55vrl9bRnka/GVn/GJgi+76fC6gSEniK0e12jgaSP5Ocp1J 5qVjQWNo+yp5aJowomUdXKdtbCqgCg2Y6J9Uzg4mUwoq9ycEGOEkPwgoUDh/wwgwgt/J 4/Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ig5CaNzl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t1si2714116ile.141.2021.06.09.02.56.19; Wed, 09 Jun 2021 02:56:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ig5CaNzl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235873AbhFHStX (ORCPT + 99 others); Tue, 8 Jun 2021 14:49:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:38012 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235511AbhFHSoG (ORCPT ); Tue, 8 Jun 2021 14:44:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6879D6144E; Tue, 8 Jun 2021 18:36:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623177390; bh=UY5gR3r7gyS9RtNxz/kI3SliK+QCmQE20Ty1PLUDCS8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ig5CaNzlU6uCQMl0WSMQyLTLCQLwx/fqqMYAMe3VmLq0ZOuRrbsGNSs/j+lvsjghZ UvRryqOfmdD2wU24R7QfgobtgVO/yecmSyBjsUBDXxZnAc3g/WEG3QXAxi27gQNgde oAnI1U8wRMgk2DVhLVQiV/nsa0RQNQI04sS299m0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Armin Wolf , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Guenter Roeck , Sasha Levin Subject: [PATCH 5.4 05/78] hwmon: (dell-smm-hwmon) Fix index values Date: Tue, 8 Jun 2021 20:26:34 +0200 Message-Id: <20210608175935.447376708@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210608175935.254388043@linuxfoundation.org> References: <20210608175935.254388043@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Armin Wolf [ Upstream commit 35d470b5fbc9f82feb77b56bb0d5d0b5cd73e9da ] When support for up to 10 temp sensors and for disabling automatic BIOS fan control was added, noone updated the index values used for disallowing fan support and fan type calls. Fix those values. Signed-off-by: Armin Wolf Reviewed-by: Pali Rohár Link: https://lore.kernel.org/r/20210513154546.12430-1-W_Armin@gmx.de Fixes: 1bb46a20e73b ("hwmon: (dell-smm) Support up to 10 temp sensors") Signed-off-by: Guenter Roeck Signed-off-by: Sasha Levin --- drivers/hwmon/dell-smm-hwmon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c index 4212d022d253..35c00420d855 100644 --- a/drivers/hwmon/dell-smm-hwmon.c +++ b/drivers/hwmon/dell-smm-hwmon.c @@ -792,10 +792,10 @@ static struct attribute *i8k_attrs[] = { static umode_t i8k_is_visible(struct kobject *kobj, struct attribute *attr, int index) { - if (disallow_fan_support && index >= 8) + if (disallow_fan_support && index >= 20) return 0; if (disallow_fan_type_call && - (index == 9 || index == 12 || index == 15)) + (index == 21 || index == 25 || index == 28)) return 0; if (index >= 0 && index <= 1 && !(i8k_hwmon_flags & I8K_HWMON_HAVE_TEMP1)) -- 2.30.2