Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1995194imu; Fri, 14 Dec 2018 04:13:51 -0800 (PST) X-Google-Smtp-Source: AFSGD/XMfY2nlujxzFjzZ1ifiDfZZMob0BI3hLIxjxRtLQw8WNW1zBV8Itr9BlW14Khauf/pKsQx X-Received: by 2002:a62:2e46:: with SMTP id u67mr2550023pfu.3.1544789631817; Fri, 14 Dec 2018 04:13:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544789631; cv=none; d=google.com; s=arc-20160816; b=Hpmc18oul78YOLgx+PsPlmMynHwtHw56sqSQuLedlelZvmaaKhV2bu6DnR28USZW4Q pLyIuV7YIxzchpaKZ2jUMioTZrR7SDW1O20hQd9Qsvs1RnoPO6t/iSTE+Ct0kmWgbn4O T1SVMUxtCVrjtiSNM/dHdXvIApjqmJGaCPD53n5P8KbPaS6EoLW2gt2DhOEIkK2F8g0h RPAAB4e427mF9r0QVeuUrBkquYT4IYcqGCBHyv6q89rW6FnqARfr1Gk/MQF48WaRu1Xl 42aKkQ6dYNazjU6eUQhZ25Ir8zUXyiJXO0ZC2OivCYgbYSbejk06IXL2kNjqBb7TmijZ ZMRA== 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=PjPkJ4tyLakM7yl+j0m1p97AJ0IdECN8JK6W1kdBNTw=; b=lnPxVqem5f4XKMQTdITO4o4VmVF4I10ELJsBRvqq8bsjA+x5c6hPajP4nsximvd8Wt NJyMWPcDON5H+bHK1zs+4Aj0ETsyhnEe75h+ct9OAUA2hrRUgsz1fLTZfYs08556QdrX EON8Tk0ahIrY4UlL8T4UX+aLBH5Xrd7t9DmMyQJ7nBJXje/E7T4kaBM3p8cg1Otwp4a/ thStQOB+60xRiDde9boAq5Rc9RMed6ILwCQ+fuj7r51SMbQvIhIVJwGx299FNV4MZy32 GazIr2xJtEmzgL+CxY7Dozb294SEATloNJeR8AUs0A2RFawUssB8tKxtLKEB0xz9hAVS 59iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Nc1bLzIN; 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 a2si3914158pgd.461.2018.12.14.04.13.37; Fri, 14 Dec 2018 04:13:51 -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=Nc1bLzIN; 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 S1731996AbeLNMMt (ORCPT + 99 others); Fri, 14 Dec 2018 07:12:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:60028 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731653AbeLNMMo (ORCPT ); Fri, 14 Dec 2018 07:12:44 -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 BC690214DE; Fri, 14 Dec 2018 12:12:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544789564; bh=htANuAWMWOIIE8+dLp29M+hBE29xTwgc5JjF6H4jVco=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nc1bLzINjdazVaXYSB6kLqxmLBFm1mcQZmvi9fFnBzN6+qHdqKdpcbfxYwmk/BjNx GYiKX2S8agY3UfmwTgBQeNkOYSNmV+XL/bJ1iMtZBSENETiO8w+xUZLCGbfMwzrnHR CPFsIfQdttGCtWgXgGETerjY+eb293kUBq+wMKnc= 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.9 20/51] hwmon: (w83795) temp4_type has writable permission Date: Fri, 14 Dec 2018 13:00:22 +0100 Message-Id: <20181214115715.287478698@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181214115713.244259772@linuxfoundation.org> References: <20181214115713.244259772@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.9-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