Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1961471ybz; Thu, 23 Apr 2020 09:06:37 -0700 (PDT) X-Google-Smtp-Source: APiQypJXMRf7CwUamJv/p9sCaduAPWg4xmXw4nSuJFYEDk4GVJqnaZBZbEguNacjCz3pfiaGEK2s X-Received: by 2002:a17:906:32d8:: with SMTP id k24mr3387603ejk.2.1587657997482; Thu, 23 Apr 2020 09:06:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587657997; cv=none; d=google.com; s=arc-20160816; b=zjrN8zeSCuTCe7/1nYRvaZb7MRKqkVyxV5TA7vjrzB+gc6sT1qH+3XdCcLGwXQoG1a NShvn0hRG8tvVyqciW3zf/KVCYwpphY8NAZBHpwEo3qCGAzmkAEKWE8BkA8YV374npRG j+ZMfNw5MHbH2O+Fn06B84T4F71UPXhsWTHusBEaAHW+3dmYSf0M4VxZSR2k3AonRpAr owky24cn7EfFDYFoDLFqpzJSDxbu+qvZGJUJmiTnbx0rBA9GNGubT1mJwMDuv1MpJG/3 3rBJQIEXrG6PILnhFtufB9UjYLPDJt+I/g4yosHVxHZgiukmfeeh9sBEt4s/z02KLgxB d0Tw== 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=tTyggdMiyAfeU2DOJTPXGoPXmFlP3BkLuzYUlJ6YQRw=; b=rpRuOI/mNQVRhoeOpovP1jhJnkbDCoHDwZ4ZOIRF9OKhEwVlsdWzDL99HePX3sYgSv 01Ug90AWt7zr26V+uZ/B8Uq7HmYcRSeWykSqHrkYxWWNpngc6V/UoYNyyGdaEKnf0HWc MUBxUV4JlACpGtwA96+HsOXOt0NkWfW1d5f7ojpqptjbF5dibyKyi9LeQFD0pS7ISzIu bPw8VheNGTb00cufCSvopr9oOx2OZA2DzsQqJI7kTHb6vJ2BvmU2NnW5KNUtm1jyR05X EmQv5Z3q89YlN8ioV6u/UvYgWuOMf/AduJ3ZvzUDUNO9YVHxoh6aRnqJKzWWb/wmtrZ8 tN2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="RqCw/nBk"; 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 dn12si2030109ejc.52.2020.04.23.09.06.10; Thu, 23 Apr 2020 09:06:37 -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="RqCw/nBk"; 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 S1729593AbgDWQCo (ORCPT + 99 others); Thu, 23 Apr 2020 12:02:44 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:41044 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729572AbgDWQCh (ORCPT ); Thu, 23 Apr 2020 12:02:37 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 03NG2Yjb101874; Thu, 23 Apr 2020 11:02:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1587657754; bh=tTyggdMiyAfeU2DOJTPXGoPXmFlP3BkLuzYUlJ6YQRw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=RqCw/nBkmIvzSm0FWGbfuGLVq7sGSLFbNYXXJpDn/+4KzdlW1PcIpWioWdR1F9sLa 5nkc9VbNtU/njGhjXwSd7BcbIRVf2G8RbuM1LdkbxfQwzv8/xpRuToq9Jp0iqLFKcT TC3dfpA9JUvSO19cxTczl85JqvrVWSk6sGSf7760= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 03NG2Yuc060700 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 23 Apr 2020 11:02:34 -0500 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Thu, 23 Apr 2020 11:02:34 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE111.ent.ti.com (157.170.170.22) 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; Thu, 23 Apr 2020 11:02:34 -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 03NG2Y0F065158; Thu, 23 Apr 2020 11:02:34 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v20 15/17] leds: lp55xx: Fix checkpatch file permissions issues Date: Thu, 23 Apr 2020 10:55:22 -0500 Message-ID: <20200423155524.13971-16-dmurphy@ti.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200423155524.13971-1-dmurphy@ti.com> References: <20200423155524.13971-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 Acked-by: Pavel Machek --- 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 f32105f8bfca..ba761824447e 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