Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1027983ybz; Wed, 29 Apr 2020 13:41:25 -0700 (PDT) X-Google-Smtp-Source: APiQypLrq1mcQ60sP4CSqf7FnbekWddtEcly+vGROp53yJbR/0ef5sZK4PR868w7xTj2seM5f4X6 X-Received: by 2002:a17:906:359b:: with SMTP id o27mr4505348ejb.282.1588192884948; Wed, 29 Apr 2020 13:41:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588192884; cv=none; d=google.com; s=arc-20160816; b=YOGR28J5Q1NiRdzT3C3MHNQ88WUCKpKiMQfCHeUH12hqJDsIXr456FKUB96i9jGo7K wHfL8aHhxDiqZxqv5LyPPAOJxgLeJ2iu+F4hVsybUy1CbvRC57WSwL2b18JYYdZYT4ws DAyOaIJBEORHN6aR+JwPt6ZRJsWACWzhyjB7MOl5bkeT/AI8iAePMssK9d2ZTGVdUVJm 5itNvCRo4yfTzueyfXOp61KHur4O/wAgNQ6vKvgrnV+Qzv+zwSQEwhildmItsn/0XZUz unqpu9h4obLFwRnH5l2of9gD5KCOND7vUHc+E9vF6UUcyJHN2yisOfUAMNBDfpyOsKBr ZM1w== 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=eZC98OOv+yIv57KbjaihSEZJlpjmT/2aLAV8pvxqq8w=; b=IrB8G/aa3Vo1gX8uwowC8vV2HlwZwWPDWgR7B7zyusx/eaTp6gQtU5qEx6buf9abBd KGs7TugehiDMFynA25w9PsbV3EUKgfcrB8CarrcHL2RjFsoqEtmVWTS9zGn8nlyChhaH RgDQab0ZJ88XL6an87/hvqtQXDTj6jySlSnvryjPP+CTEeeQG0Rcm4g7+B7ahs9KwLFr cMN1e9VilZKKF5LB1W9hqUKjvc9yIaumYXErpl9cLP1DoaEi+YaaTq2pxYSWw8p0o9zE pdCwjuD0WKdVHsvakookrqyiG5JEBO3QcZ0rdsA0wAvSszGMhTALdN1XcSbYJvLhw8w9 XumA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=cGjMsRsy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id by8si4604822ejb.525.2020.04.29.13.41.01; Wed, 29 Apr 2020 13:41:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=cGjMsRsy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727925AbgD2UhX (ORCPT + 99 others); Wed, 29 Apr 2020 16:37:23 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:54914 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727840AbgD2UhM (ORCPT ); Wed, 29 Apr 2020 16:37:12 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 03TKb8aj118315; Wed, 29 Apr 2020 15:37:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1588192628; bh=eZC98OOv+yIv57KbjaihSEZJlpjmT/2aLAV8pvxqq8w=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=cGjMsRsyYUDYs6ysfDBYyzacV1lzxvXKq8mV3antuOTVO6ospYOSOPVAVq17J8x2+ Daaf4W36oSC33jwTKIXKoTpKNslDDh2XkT39QvynzUjBfuQAonO78H3dCsNa/7lVaE cp8/ASfS87pfdIuYnXVyvyWKC3Xk2wrb3VLV8TTk= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 03TKb8YA057668 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 29 Apr 2020 15:37:08 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Wed, 29 Apr 2020 15:37:08 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Wed, 29 Apr 2020 15:37:08 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 03TKb86m120436; Wed, 29 Apr 2020 15:37:08 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v23 14/16] leds: lp55xx: Fix checkpatch file permissions issues Date: Wed, 29 Apr 2020 15:28:14 -0500 Message-ID: <20200429202816.26501-15-dmurphy@ti.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200429202816.26501-1-dmurphy@ti.com> References: <20200429202816.26501-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. Acked-by: Pavel Machek Acked-by: Jacek Anaszewski 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 19872d1435b3..82c392afeef7 100644 --- a/drivers/leds/leds-lp55xx-common.c +++ b/drivers/leds/leds-lp55xx-common.c @@ -83,7 +83,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) { @@ -92,7 +92,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) { @@ -116,7 +116,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) { @@ -125,9 +125,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, @@ -272,7 +271,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) { @@ -282,7 +281,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) { @@ -324,7 +323,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) { @@ -349,9 +348,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.25.1