From patchwork Fri Oct 11 13:06:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 175930 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp729765ill; Fri, 11 Oct 2019 06:07:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwdo9rPCittzL6WPSebe4AnVy4w8WglqPT+teP8T5YSvdUuj4NsEX3fGlT6gWSfNGDOZ8dE X-Received: by 2002:a17:906:6a15:: with SMTP id o21mr13470306ejr.79.1570799249719; Fri, 11 Oct 2019 06:07:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570799249; cv=none; d=google.com; s=arc-20160816; b=wia0gK6/HJb5GUbq6eDSfe91Z2JfxIHhBTuW3KPbhVDCxEcah8JV3+Mmk1RspvNwgl LeBYaC8yhQFCGjMN3NzpFPng4KtkNxwn37akIbFKZj2CtcyLj8iqi776cOfC2lSrfY7t harc7dA5wM+4hLw0pls80okQHUaC04O3A0BJzyShK+2VD958dlFPOYBAfgNncmZdzUHS xdADDZAdzpsN5fqqxymJDg2aLpbj9wh1K8LM2yDTj9OXX7OJcdEKbGNVwaHRi3NNqpI4 th6xkZf+2cB6xjgJXrlee5+54bNdGPE5aPMeNsvhb90lRrYV1LRFrzTSOaOyVbPTx7ZT cA7Q== 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=0I176MMnQgy0ZK7dTyt6Z4H429QMLEO5OpK17WdYyt4=; b=Rj2or9d1S3RfwH0+xp0PJLfXojZ0Uq+Z1AsquTpWM+9Hncxe0I5OITicZoGcN8+UsU iwZxL32LhnSrJTpfH0OSHG3/T2w3tdR5Plc0rwpjdLwqElXkX7/iqReIDPx5BhogXtBT TNB3dpfvXGwi79Y48y1PyQ1byI2wYiIqnLFqLVneCcZPS2CK5uTmW0wnQLGu2EAo7bvx 51fd3MFJbGUVmHeRNb/Eh+Y0WnTwJu9xogu26KZvNEbje32ZGIfl0A2ROAZOvC6TLfNn MOvICGxgEKzcVFjn3S3zokWR7taMKI/eN9e70QxqqE9zoq0d5HvN5lb8roeBtA/9FWiZ bsRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=GhCYfVo1; 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 l26si5564218edb.258.2019.10.11.06.07.29; Fri, 11 Oct 2019 06:07:29 -0700 (PDT) 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=GhCYfVo1; 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 S1728360AbfJKNH3 (ORCPT + 21 others); Fri, 11 Oct 2019 09:07:29 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:45600 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728252AbfJKNHY (ORCPT ); Fri, 11 Oct 2019 09:07:24 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9BD7MXb080610; Fri, 11 Oct 2019 08:07:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570799242; bh=0I176MMnQgy0ZK7dTyt6Z4H429QMLEO5OpK17WdYyt4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=GhCYfVo1YQwjBzu1AioaHWReCOPhD/SS/ZfUiiBHkNaBIqP6ww4ZNIeJv5IDIChFs LhX2h76ypv7LHXd93kjxA2lhbzjNRfDqAfsXObFeV4vk56NCLPMk9t2wsHkoi8N82z L4LwfpWgci/BwSnYG/yIzE02s6ITr3Yu2GlWBqd8= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x9BD7Ln0016416 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 11 Oct 2019 08:07:22 -0500 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 11 Oct 2019 08:07:17 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Fri, 11 Oct 2019 08:07:17 -0500 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 x9BD7Lg9105257; Fri, 11 Oct 2019 08:07:21 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v12 15/16] leds: lp55xx: Fix checkpatch file permissions issues Date: Fri, 11 Oct 2019 08:06:56 -0500 Message-ID: <20191011130657.4713-16-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191011130657.4713-1-dmurphy@ti.com> References: <20191011130657.4713-1-dmurphy@ti.com> MIME-Version: 1.0 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(-) -- 2.22.0.214.g8dca754b1e diff --git a/drivers/leds/leds-lp55xx-common.c b/drivers/leds/leds-lp55xx-common.c index 1417df6df8a7..0d8d1824ea7e 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, @@ -282,7 +281,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) { @@ -292,7 +291,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) { @@ -334,7 +333,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) { @@ -359,9 +358,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,