Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2019030imu; Fri, 14 Dec 2018 04:35:58 -0800 (PST) X-Google-Smtp-Source: AFSGD/UYurSxjHMJMybADrKtG0kKCHKF7A4YK40Nz6XIN5HV0w5zlHCNnlmIY0nwLAg94alQquuP X-Received: by 2002:a62:3c1:: with SMTP id 184mr2737920pfd.56.1544790958332; Fri, 14 Dec 2018 04:35:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544790958; cv=none; d=google.com; s=arc-20160816; b=IxkfjsJUAhuc7t/rbyuFYQG0oRQt+ZuUHKoiJpIGQX68G4M/mycQDTrzTSMVLQlYrZ Wgme7/5MKw0bpGi1FB0i3jsgzA4hOVjJFy2PURDMySonWpj3k98/fvAqxT+avS+YrseF DTsmuk9nCvOIbzccg31q0FScmYv/BMWk995zLpl5QoGRc0WtGoR+JSHCNf8MAI3Be/fU 5qQnZ8s0EzWg0D6mcLlkZyJd0PMrZVXiUjnXIdZvWD6sJWTZjAATJaLTPlgn7eUp2K/3 6ExFHRsXisjanPR3EbWYac1DMo+4UuOKP3CDEF4hGF8TdUe9kw6BRu30gXwR3uLT4Ofn eTJA== 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=FJOnNryuWI4DvBbVH+NbE0b+omUe32U0x+QeW0upDBY=; b=PyL8CjweunJAM7IxbvVzgxXWblETgbGcgeAKuyfbXa9PZtRb5AOCv4GfNSEGh0dRk4 wT+bC2Kuf4+/OATZ3OipVH3J7j4SGDrL+8qHebEhOdvgtuSRXprjWQHrE1cG7UmBTyPU rMSwDjvAhO+y0TFfIKbzRxU+7IVv8TYcy7SOfsY1qPjlIqhO7S+sRbkNre7Y5aEyjPnr 9A5SOFR61zm0buhnCE0zhc4SmnScjjJy/hKdrOuy6mOQV3u+nz039WBQNWHyh9JaTW+j U/neTBYDGF5U4Ci60rNZGKSPfA+6dTJkTBk038+smNHA9JLNnyUO0by+JeOotepfhB4L aNiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QG8rE9D0; 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 u6si4431288pfb.92.2018.12.14.04.35.41; Fri, 14 Dec 2018 04:35:58 -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=QG8rE9D0; 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 S1731406AbeLNMdl (ORCPT + 99 others); Fri, 14 Dec 2018 07:33:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:53916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730672AbeLNMI2 (ORCPT ); Fri, 14 Dec 2018 07:08:28 -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 11B4B214C4; Fri, 14 Dec 2018 12:08:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544789307; bh=foQS5oF8pMRFG3QKpM7jbWLMCgaqs0qEPrRyZqH4SSM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QG8rE9D0qKeztzCPRglgdB7rjDsPsIYzy9u8NmvulkyQUbPggpkDRc2duriVYNOoq XoTOba3QYJh8ZuhPlVDRILaBMS26sKck6llhiTQ9WFHMY7AE5bJso7pR7v2JDCHEre 0/jpass6WXkcKnPadSc2pGSe0WZMo96UNBj/Uw80= 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.14 32/89] hwmon: (w83795) temp4_type has writable permission Date: Fri, 14 Dec 2018 12:59:45 +0100 Message-Id: <20181214115731.271134014@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181214115729.658859279@linuxfoundation.org> References: <20181214115729.658859279@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.14-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