Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2025512imu; Fri, 14 Dec 2018 04:42:27 -0800 (PST) X-Google-Smtp-Source: AFSGD/VGRl1VqTIZsCA9QGyfm+tvsb4dAFOqT2KXpJkXRng3Snkdr54uQXRSsnVe3NuIcV5SFrZb X-Received: by 2002:a17:902:e10a:: with SMTP id cc10mr2774018plb.165.1544791347565; Fri, 14 Dec 2018 04:42:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544791347; cv=none; d=google.com; s=arc-20160816; b=DefS3jfDxc1mMOzbS6gYbyg83IdQIansso91ubEoXPbsGgQyShMap45X0z49rodeN2 mEALw/n+UKGDUIbBZulWICcjcd0AHDjj4g3fwrkuzFXxMQHuvSS1M38ZuYE2D3AsqQYY OsPazZGll5iNQoiVcEyivjcb9QRO9BNKpehxJpY3Lmk1R6l8Js/jC9Elv5f/O6srCmT8 wY3EBi1P8QuuhyGc0rhNzGMNVTo5V1xie/yxJeWDJhWXnsZRuvS8+2gHJZTNR0+cfw/w AekZNZUECKt2E229YsFJIDfQTF0MY8mhNX2ziP5m9N5tNufmVPHnZEW7kVYhk5hMjmLa Z8Rw== 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=d5KatiX6c6D4AluaFR9lMra2e8qmu/HCeFoxxaH1R5U=; b=nVeNqC7mIHtJnS1rxDNfVuaUdhU8jkOIVS+sj57qqV0DylTAAOv6FZUnTTuAZXvTZ5 YTD/CAOwLpnArmM/oSCHg/5vBQEkBjH0tF+QIyNcvLKx9Gjkfps+inmwxzqBIyTC83Ja JjR5yRCEUFvuHnx/QMPF8Pf/JR+FC82ncbbaxZA3c8KBLq657uHngV2gKZWXZNHWgUi3 LDuKPJPS0+LHQMCqxKBzmtxoE6ybxdNfP0CgaRL6EDXlpRoyIf41gzhM+obSyx1pDC7v qd6kTYN8Ni8/N7DBaGygXYGD+DDEpeVrF+vfXAFWh4b/jZQ5nNyn/4Q5Yu7zU5hsTyRd Wivg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YsOnijU4; 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 c31si4080690pgc.465.2018.12.14.04.42.10; Fri, 14 Dec 2018 04:42:27 -0800 (PST) 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=YsOnijU4; 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 S1730603AbeLNMlO (ORCPT + 99 others); Fri, 14 Dec 2018 07:41:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:47458 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730336AbeLNMDe (ORCPT ); Fri, 14 Dec 2018 07:03:34 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 E289E21479; Fri, 14 Dec 2018 12:03:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544789014; bh=SV+bFk8Uela6GJCi+Pidq0Ux8QdOI1gSfliHdBVmxQc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YsOnijU485W/B/qmqInXKCnLwUfvq4rjbuYnP0nm7GTjmjdxPFgdKGYWbq8qjHP0C TmYh5qjF7Wyv7CYJ1wjAKsDBIz3sfWTzNPJXfoxZq2+g/xTL7jZHLf9dGCD9GrXgw1 rViF/Y3CdvswbGYRD4VcpJS9VBVZWSqRsrC6KXZA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yao Wang , Huacai Chen , Guenter Roeck , Sasha Levin Subject: [PATCH 4.19 061/142] hwmon: (w83795) temp4_type has writable permission Date: Fri, 14 Dec 2018 12:59:06 +0100 Message-Id: <20181214115749.495996789@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181214115747.053633987@linuxfoundation.org> References: <20181214115747.053633987@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 09aaf6813cfca4c18034fda7a43e68763f34abb1 ] Both datasheet and comments of store_temp_mode() tell us that temp1~4_type is writable, so fix it. Signed-off-by: Yao Wang Signed-off-by: Huacai Chen Fixes: 39deb6993e7c (" hwmon: (w83795) Simplify temperature sensor type handling") Signed-off-by: Guenter Roeck Signed-off-by: Sasha Levin --- drivers/hwmon/w83795.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/w83795.c b/drivers/hwmon/w83795.c index 49276bbdac3d..1bb80f992aa8 100644 --- a/drivers/hwmon/w83795.c +++ b/drivers/hwmon/w83795.c @@ -1691,7 +1691,7 @@ store_sf_setup(struct device *dev, struct device_attribute *attr, * somewhere else in the code */ #define SENSOR_ATTR_TEMP(index) { \ - SENSOR_ATTR_2(temp##index##_type, S_IRUGO | (index < 4 ? S_IWUSR : 0), \ + SENSOR_ATTR_2(temp##index##_type, S_IRUGO | (index < 5 ? S_IWUSR : 0), \ show_temp_mode, store_temp_mode, NOT_USED, index - 1), \ SENSOR_ATTR_2(temp##index##_input, S_IRUGO, show_temp, \ NULL, TEMP_READ, index - 1), \ -- 2.19.1