Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3899471ybx; Mon, 4 Nov 2019 04:43:25 -0800 (PST) X-Google-Smtp-Source: APXvYqysqAvXUtSS8f4g4yqTz5JLx3BPhTZ28OxHAnEZYQR5nhL2aeQ9JR5lbpCIPrs9ouWt8tTU X-Received: by 2002:a17:906:48c5:: with SMTP id d5mr653917ejt.167.1572871405533; Mon, 04 Nov 2019 04:43:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572871405; cv=none; d=google.com; s=arc-20160816; b=g+I5QI2UvLLtnsBTFvmwrKjZeYGfoo/z8K8gnWa7l2IzGxP9YnVQj8DjeOn5ZRYhBY um7wCuCKuly/0L0aLBDeBnTgD+kzqABjI+VaY33ofmZ6hAJk5k81nKCyLlLbZjuN87u5 beataDs7ZBvMrd6u+DTIsrMasE1G0iCs5POBea0rPdlFZqpQYE5QpxmLqXLOmTLGGjOq CjpXaCzH2mT58UwNiwAn6zDz5Uy4ltr0eFrIpYqQxaG/wm7LfUQ2h6RmqAmGWvRc6Z+i Ma2wV50tcqyGTVNo/3+FoOPVbuVTuJ06liJSx+qaLhAeSHd2lLYf/J3cw5H1XX75wA63 M7zA== 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=AqrA0heTpG24qNn7s3jzY4NATtXzdKa9GETwO2HuP59wMsaQD/Tnh2pZk69401p6ph 75iSTj5qyo0Vfj3X3tq2YSw+6B+AVwrKabTQQRRm3BnKDCq3D1gIgMiMZl/tT9O3Q63g 5KlbJLgPJ/QEe3XeEtn5mHbFMyacKjfj9BbDr4IthK4n8MO+2Nn0BmG9+tYIf0rsMciv POdrCI1DLqo38NiqtpH/UGR+CYogaQ4BqiST535Q4teA84b2RHzZM4o3Gv5TmPp0/j48 vCCA9XWOlwcPlTXjkDI2Gh6UXmDuVly13r3bMy80C0FAYPHGm14qWVO71hauAPuFb0Re tNJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=DO8u3eoD; 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 f18si8954001ejf.210.2019.11.04.04.43.02; Mon, 04 Nov 2019 04:43:25 -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=DO8u3eoD; 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 S1729233AbfKDMjd (ORCPT + 99 others); Mon, 4 Nov 2019 07:39:33 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:49426 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727267AbfKDMjc (ORCPT ); Mon, 4 Nov 2019 07:39:32 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id xA4CdTNJ041238; Mon, 4 Nov 2019 06:39:29 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1572871169; bh=mzXCOj+zhvqp8piY/7HPCwJgl3+DnF5Gwg863ZX0foY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=DO8u3eoDYS557TnKPV26go99hcv2M45zKgtsdx1ajH7OzjtLye4ENYyVruniLrN9x Vo70FrgwaUu1uMEf2mPd++QzZ6ig/WMJTdwufzQFIjoJOsRhpqX2MotRNAzBPdAfFj 70k+PzVKJvUEfaGGTzqwdX/SqaVPinC0FZSCow9k= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xA4CdTQc088762 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 4 Nov 2019 06:39:29 -0600 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 4 Nov 2019 06:39:15 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE112.ent.ti.com (10.64.6.33) 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; Mon, 4 Nov 2019 06:39:14 -0600 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 xA4CdTTX086866; Mon, 4 Nov 2019 06:39:29 -0600 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v16 16/19] leds: lp55xx: Fix checkpatch file permissions issues Date: Mon, 4 Nov 2019 06:37:04 -0600 Message-ID: <20191104123707.31930-17-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191104123707.31930-1-dmurphy@ti.com> References: <20191104123707.31930-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