From patchwork Fri Dec 23 22:12:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Koch X-Patchwork-Id: 9487697 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A1F7462AAB for ; Fri, 23 Dec 2016 22:13:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 937AC25D99 for ; Fri, 23 Dec 2016 22:13:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 872B826253; Fri, 23 Dec 2016 22:13:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=2.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CEF8225D99 for ; Fri, 23 Dec 2016 22:13:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758731AbcLWWNE (ORCPT ); Fri, 23 Dec 2016 17:13:04 -0500 Received: from argos.tuxed.org ([176.9.87.227]:51068 "EHLO argos.tuxed.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753699AbcLWWNB (ORCPT ); Fri, 23 Dec 2016 17:13:01 -0500 Received: from thor.home.lan (unknown [IPv6:2a02:8071:3183:6700:8080:df34:b3ba:2cd1]) by argos.tuxed.org (Postfix) with ESMTPSA id A945E6E38E; Fri, 23 Dec 2016 23:12:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alexanderkoch.net; s=default; t=1482531158; bh=7gEGUMi1TYn4Xl2nKFKEwTAK+lc5G1ibD4o2dp+QTGI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CXS1zujNk5vnQfM39MMtCFFhIs96GgCTwqkxtF79u8MDH+nN6nzvzj5Hv4/t+pJn+ tQjhkgDB3jmO22ms2XYWTwbsAqUcbEWq5BtNgIAj7C7S/MiCRgK19qz9461EjQPf9P W16UmxkyxiFKILCRz1awZvTKdy0MFCXN13SPT2tU= From: Alexander Koch To: linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org Cc: Rob Herring , Mark Rutland , Jean Delvare , Guenter Roeck , Jiri Kosina , Alexander Koch Subject: [RFC PATCH v2 3/4] hwmon: adc128d818: Trivial code style fixup Date: Fri, 23 Dec 2016 23:12:04 +0100 Message-Id: <20161223221205.8825-4-mail@alexanderkoch.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20161223221205.8825-1-mail@alexanderkoch.net> References: <20161223221205.8825-1-mail@alexanderkoch.net> X-Virus-Scanned: clamav-milter 0.99.2 at argos X-Virus-Status: Clean Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Replace sysfs symbolic file permissions, e.g. 'S_IRUGO', by octal permissions. This fixes checkpatch.pl warnings. Signed-off-by: Alexander Koch --- drivers/hwmon/adc128d818.c | 99 ++++++++++++++++++---------------------------- 1 file changed, 39 insertions(+), 60 deletions(-) diff --git a/drivers/hwmon/adc128d818.c b/drivers/hwmon/adc128d818.c index 8667f454ea11..cbb3bc5e5229 100644 --- a/drivers/hwmon/adc128d818.c +++ b/drivers/hwmon/adc128d818.c @@ -242,69 +242,48 @@ static ssize_t adc128_show_alarm(struct device *dev, return sprintf(buf, "%u\n", !!(alarms & mask)); } -static SENSOR_DEVICE_ATTR_2(in0_input, S_IRUGO, - adc128_show_in, NULL, 0, 0); -static SENSOR_DEVICE_ATTR_2(in0_min, S_IWUSR | S_IRUGO, - adc128_show_in, adc128_set_in, 0, 1); -static SENSOR_DEVICE_ATTR_2(in0_max, S_IWUSR | S_IRUGO, - adc128_show_in, adc128_set_in, 0, 2); - -static SENSOR_DEVICE_ATTR_2(in1_input, S_IRUGO, - adc128_show_in, NULL, 1, 0); -static SENSOR_DEVICE_ATTR_2(in1_min, S_IWUSR | S_IRUGO, - adc128_show_in, adc128_set_in, 1, 1); -static SENSOR_DEVICE_ATTR_2(in1_max, S_IWUSR | S_IRUGO, - adc128_show_in, adc128_set_in, 1, 2); - -static SENSOR_DEVICE_ATTR_2(in2_input, S_IRUGO, - adc128_show_in, NULL, 2, 0); -static SENSOR_DEVICE_ATTR_2(in2_min, S_IWUSR | S_IRUGO, - adc128_show_in, adc128_set_in, 2, 1); -static SENSOR_DEVICE_ATTR_2(in2_max, S_IWUSR | S_IRUGO, - adc128_show_in, adc128_set_in, 2, 2); - -static SENSOR_DEVICE_ATTR_2(in3_input, S_IRUGO, - adc128_show_in, NULL, 3, 0); -static SENSOR_DEVICE_ATTR_2(in3_min, S_IWUSR | S_IRUGO, - adc128_show_in, adc128_set_in, 3, 1); -static SENSOR_DEVICE_ATTR_2(in3_max, S_IWUSR | S_IRUGO, - adc128_show_in, adc128_set_in, 3, 2); - -static SENSOR_DEVICE_ATTR_2(in4_input, S_IRUGO, - adc128_show_in, NULL, 4, 0); -static SENSOR_DEVICE_ATTR_2(in4_min, S_IWUSR | S_IRUGO, - adc128_show_in, adc128_set_in, 4, 1); -static SENSOR_DEVICE_ATTR_2(in4_max, S_IWUSR | S_IRUGO, - adc128_show_in, adc128_set_in, 4, 2); - -static SENSOR_DEVICE_ATTR_2(in5_input, S_IRUGO, - adc128_show_in, NULL, 5, 0); -static SENSOR_DEVICE_ATTR_2(in5_min, S_IWUSR | S_IRUGO, - adc128_show_in, adc128_set_in, 5, 1); -static SENSOR_DEVICE_ATTR_2(in5_max, S_IWUSR | S_IRUGO, - adc128_show_in, adc128_set_in, 5, 2); - -static SENSOR_DEVICE_ATTR_2(in6_input, S_IRUGO, - adc128_show_in, NULL, 6, 0); -static SENSOR_DEVICE_ATTR_2(in6_min, S_IWUSR | S_IRUGO, - adc128_show_in, adc128_set_in, 6, 1); -static SENSOR_DEVICE_ATTR_2(in6_max, S_IWUSR | S_IRUGO, - adc128_show_in, adc128_set_in, 6, 2); - -static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, adc128_show_temp, NULL, 0); -static SENSOR_DEVICE_ATTR(temp1_max, S_IWUSR | S_IRUGO, +static SENSOR_DEVICE_ATTR_2(in0_input, 0444, adc128_show_in, NULL, 0, 0); +static SENSOR_DEVICE_ATTR_2(in0_min, 0644, adc128_show_in, adc128_set_in, 0, 1); +static SENSOR_DEVICE_ATTR_2(in0_max, 0644, adc128_show_in, adc128_set_in, 0, 2); + +static SENSOR_DEVICE_ATTR_2(in1_input, 0444, adc128_show_in, NULL, 1, 0); +static SENSOR_DEVICE_ATTR_2(in1_min, 0644, adc128_show_in, adc128_set_in, 1, 1); +static SENSOR_DEVICE_ATTR_2(in1_max, 0644, adc128_show_in, adc128_set_in, 1, 2); + +static SENSOR_DEVICE_ATTR_2(in2_input, 0444, adc128_show_in, NULL, 2, 0); +static SENSOR_DEVICE_ATTR_2(in2_min, 0644, adc128_show_in, adc128_set_in, 2, 1); +static SENSOR_DEVICE_ATTR_2(in2_max, 0644, adc128_show_in, adc128_set_in, 2, 2); + +static SENSOR_DEVICE_ATTR_2(in3_input, 0444, adc128_show_in, NULL, 3, 0); +static SENSOR_DEVICE_ATTR_2(in3_min, 0644, adc128_show_in, adc128_set_in, 3, 1); +static SENSOR_DEVICE_ATTR_2(in3_max, 0644, adc128_show_in, adc128_set_in, 3, 2); + +static SENSOR_DEVICE_ATTR_2(in4_input, 0444, adc128_show_in, NULL, 4, 0); +static SENSOR_DEVICE_ATTR_2(in4_min, 0644, adc128_show_in, adc128_set_in, 4, 1); +static SENSOR_DEVICE_ATTR_2(in4_max, 0644, adc128_show_in, adc128_set_in, 4, 2); + +static SENSOR_DEVICE_ATTR_2(in5_input, 0444, adc128_show_in, NULL, 5, 0); +static SENSOR_DEVICE_ATTR_2(in5_min, 0644, adc128_show_in, adc128_set_in, 5, 1); +static SENSOR_DEVICE_ATTR_2(in5_max, 0644, adc128_show_in, adc128_set_in, 5, 2); + +static SENSOR_DEVICE_ATTR_2(in6_input, 0444, adc128_show_in, NULL, 6, 0); +static SENSOR_DEVICE_ATTR_2(in6_min, 0644, adc128_show_in, adc128_set_in, 6, 1); +static SENSOR_DEVICE_ATTR_2(in6_max, 0644, adc128_show_in, adc128_set_in, 6, 2); + +static SENSOR_DEVICE_ATTR(temp1_input, 0444, adc128_show_temp, NULL, 0); +static SENSOR_DEVICE_ATTR(temp1_max, 0644, adc128_show_temp, adc128_set_temp, 1); -static SENSOR_DEVICE_ATTR(temp1_max_hyst, S_IWUSR | S_IRUGO, +static SENSOR_DEVICE_ATTR(temp1_max_hyst, 0644, adc128_show_temp, adc128_set_temp, 2); -static SENSOR_DEVICE_ATTR(in0_alarm, S_IRUGO, adc128_show_alarm, NULL, 0); -static SENSOR_DEVICE_ATTR(in1_alarm, S_IRUGO, adc128_show_alarm, NULL, 1); -static SENSOR_DEVICE_ATTR(in2_alarm, S_IRUGO, adc128_show_alarm, NULL, 2); -static SENSOR_DEVICE_ATTR(in3_alarm, S_IRUGO, adc128_show_alarm, NULL, 3); -static SENSOR_DEVICE_ATTR(in4_alarm, S_IRUGO, adc128_show_alarm, NULL, 4); -static SENSOR_DEVICE_ATTR(in5_alarm, S_IRUGO, adc128_show_alarm, NULL, 5); -static SENSOR_DEVICE_ATTR(in6_alarm, S_IRUGO, adc128_show_alarm, NULL, 6); -static SENSOR_DEVICE_ATTR(temp1_max_alarm, S_IRUGO, adc128_show_alarm, NULL, 7); +static SENSOR_DEVICE_ATTR(in0_alarm, 0444, adc128_show_alarm, NULL, 0); +static SENSOR_DEVICE_ATTR(in1_alarm, 0444, adc128_show_alarm, NULL, 1); +static SENSOR_DEVICE_ATTR(in2_alarm, 0444, adc128_show_alarm, NULL, 2); +static SENSOR_DEVICE_ATTR(in3_alarm, 0444, adc128_show_alarm, NULL, 3); +static SENSOR_DEVICE_ATTR(in4_alarm, 0444, adc128_show_alarm, NULL, 4); +static SENSOR_DEVICE_ATTR(in5_alarm, 0444, adc128_show_alarm, NULL, 5); +static SENSOR_DEVICE_ATTR(in6_alarm, 0444, adc128_show_alarm, NULL, 6); +static SENSOR_DEVICE_ATTR(temp1_max_alarm, 0444, adc128_show_alarm, NULL, 7); static struct attribute *adc128_attrs[] = { &sensor_dev_attr_in0_min.dev_attr.attr,