Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3199951ybc; Thu, 14 Nov 2019 05:36:58 -0800 (PST) X-Google-Smtp-Source: APXvYqzOmmynIPUz2O+42wVwM9KmVqBOVi1JGbG62HrUd5kW2uC3gKEqTrZMVXz5gn6atanDpPLu X-Received: by 2002:a17:906:4dd5:: with SMTP id f21mr8415473ejw.203.1573738618003; Thu, 14 Nov 2019 05:36:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573738617; cv=none; d=google.com; s=arc-20160816; b=pbsAABhYdl1tusLqTpcKHdyWnnO/yP5c6mOlikCTcAu+LEvnh/BWtzHGSXxPqSTWa/ DFVdXXLHAhNb7d+Jq113HvyR+81nLrIj5FVoXBXv4zGuWUFM/s2U08h30KyHFltgPA16 9RiDY9jAKAsxDdh+vv24cqDTv5Ge69nt3bTh7b3kODNqBirXUwcHE684Kv7FnUtCuvXn vyPavLB50sEjQwRGfyxSgCg2qIa/S+ATFP21rosSCm+lnVVn7DEBaBOIOt5qO70CrY1o 6M/QvcFQtU5fkB4W/Tie/b/xpGK00wOEAXQK0jGS9W82o0VTMIp5zuZS61q/ApSbw31X JlYQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mzXCOj+zhvqp8piY/7HPCwJgl3+DnF5Gwg863ZX0foY=; b=ij/sPg0ak6dNw2b1BnF/szAjcPtByvtEash2/1K0HiXvnQW2lXsPb1Ofm/xjmZVgo0 8D1IbpcSZuM5BSEcahc5mV2fMXxmG8iYFdEu9Mj3nBkSiFAhepmiegTyjX7+6NfqwDXw IogiKICSmm6wveatrXeaN3kd4pP5qMuvCljk6W5RPVR2tNjTHwHIwBw8dncNbZQNR7vn hkD53Zv9biOFy24SkqN//e71AQStq08qy41DHBwzvknBHyVEqxyvFxU6tulhEKt9ax68 ryHm+CwSQ6OVAl5qig0Ud4T/8zRmIV/Y56yBLYWzJOaxcXSuxWlM5cHqNhdcQuZTCTe0 dXjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=J4kCkfFI; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rl7si3353317ejb.340.2019.11.14.05.36.32; Thu, 14 Nov 2019 05:36:57 -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=@ti.com header.s=ti-com-17Q1 header.b=J4kCkfFI; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727450AbfKNNct (ORCPT + 99 others); Thu, 14 Nov 2019 08:32:49 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:49030 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726980AbfKNNcs (ORCPT ); Thu, 14 Nov 2019 08:32:48 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id xAEDWjS4067543; Thu, 14 Nov 2019 07:32:45 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1573738365; bh=mzXCOj+zhvqp8piY/7HPCwJgl3+DnF5Gwg863ZX0foY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=J4kCkfFIrOGU8TcErrm4SGam4Z+/ourD73zGc37MDNozxdOYcMRsyibjB25uutwFZ LfjwXu/edEwXfm98FBLa5neKtqczDNHmBXhFc9GoyXOIUpKB9I4cc2+UuOmRPr+zGO ewdmRn/p/UVjscve6hDtVs97yNkw/xUbHtIt6fBk= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xAEDWjMp006112 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 14 Nov 2019 07:32:45 -0600 Received: from DLEE104.ent.ti.com (157.170.170.34) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 14 Nov 2019 07:32:45 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 14 Nov 2019 07:32:45 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id xAEDWjDa032329; Thu, 14 Nov 2019 07:32:45 -0600 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v17 16/19] leds: lp55xx: Fix checkpatch file permissions issues Date: Thu, 14 Nov 2019 07:30:20 -0600 Message-ID: <20191114133023.32185-17-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191114133023.32185-1-dmurphy@ti.com> References: <20191114133023.32185-1-dmurphy@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the checkpatch warnings for the use of the file permission macros. In converting the file permissions to the DEVICE_ATTR_XX macros the call back function names needed to be updated within the code. This means that the lp55xx_ needed to be dropped in the name to keep in harmony with the ABI documentation. Signed-off-by: Dan Murphy --- drivers/leds/leds-lp55xx-common.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/leds/leds-lp55xx-common.c b/drivers/leds/leds-lp55xx-common.c index c2087a654ea8..41d8c5e41306 100644 --- a/drivers/leds/leds-lp55xx-common.c +++ b/drivers/leds/leds-lp55xx-common.c @@ -78,7 +78,7 @@ static int lp55xx_post_init_device(struct lp55xx_chip *chip) return cfg->post_init_device(chip); } -static ssize_t lp55xx_show_current(struct device *dev, +static ssize_t led_current_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -87,7 +87,7 @@ static ssize_t lp55xx_show_current(struct device *dev, return scnprintf(buf, PAGE_SIZE, "%d\n", led->led_current); } -static ssize_t lp55xx_store_current(struct device *dev, +static ssize_t led_current_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t len) { @@ -111,7 +111,7 @@ static ssize_t lp55xx_store_current(struct device *dev, return len; } -static ssize_t lp55xx_show_max_current(struct device *dev, +static ssize_t max_current_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -120,9 +120,8 @@ static ssize_t lp55xx_show_max_current(struct device *dev, return scnprintf(buf, PAGE_SIZE, "%d\n", led->max_current); } -static DEVICE_ATTR(led_current, S_IRUGO | S_IWUSR, lp55xx_show_current, - lp55xx_store_current); -static DEVICE_ATTR(max_current, S_IRUGO , lp55xx_show_max_current, NULL); +static DEVICE_ATTR_RW(led_current); +static DEVICE_ATTR_RO(max_current); static struct attribute *lp55xx_led_attrs[] = { &dev_attr_led_current.attr, @@ -292,7 +291,7 @@ static int lp55xx_request_firmware(struct lp55xx_chip *chip) GFP_KERNEL, chip, lp55xx_firmware_loaded); } -static ssize_t lp55xx_show_engine_select(struct device *dev, +static ssize_t select_engine_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -302,7 +301,7 @@ static ssize_t lp55xx_show_engine_select(struct device *dev, return sprintf(buf, "%d\n", chip->engine_idx); } -static ssize_t lp55xx_store_engine_select(struct device *dev, +static ssize_t select_engine_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t len) { @@ -344,7 +343,7 @@ static inline void lp55xx_run_engine(struct lp55xx_chip *chip, bool start) chip->cfg->run_engine(chip, start); } -static ssize_t lp55xx_store_engine_run(struct device *dev, +static ssize_t run_engine_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t len) { @@ -369,9 +368,8 @@ static ssize_t lp55xx_store_engine_run(struct device *dev, return len; } -static DEVICE_ATTR(select_engine, S_IRUGO | S_IWUSR, - lp55xx_show_engine_select, lp55xx_store_engine_select); -static DEVICE_ATTR(run_engine, S_IWUSR, NULL, lp55xx_store_engine_run); +static DEVICE_ATTR_RW(select_engine); +static DEVICE_ATTR_WO(run_engine); static struct attribute *lp55xx_engine_attributes[] = { &dev_attr_select_engine.attr, -- 2.22.0.214.g8dca754b1e