Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1934451ybt; Mon, 15 Jun 2020 13:20:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxICwkL0wId+Ic/hg6CGbeT8genfOodE8urjmISOW9pd0cZU0WSOmZhRiHeUCNzPvwQtMGM X-Received: by 2002:a05:6402:a49:: with SMTP id bt9mr25942604edb.300.1592252418496; Mon, 15 Jun 2020 13:20:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592252418; cv=none; d=google.com; s=arc-20160816; b=lpOxBxjv4wl0G3gyu4+Wl/i82PSZXqZnmnnkYKjDgUD7r85r3Dw7FDIUFOdK6ZVSZz e0Ycgr/1OsL1Fi8D6imDJ6yaFj/eZhlG0OCa8RdrlbaqVxbM/mjseYbZVgoRkRwyls48 QFf4rNL3Qsrtwszd0Uui4vxlaagomZV7rW+8petWlM7hTpBKCRfAdTLOpQo6znTlu3FF g8Mx+7fvsMAaqskrz/DrP283Ncam/YNhURGc0zMGku2UMTx3KW4+Gt5MsQRrz5IGl6xB UXnqt0PSCSnJiQEuxKntr5vSg7+8TPuVnDTO5NWa8o94VGhQmw+4pX5cU5qbVXDiTobH rUrQ== 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=9rbi449bFmHQundQ8dlXaifDs/ndof179QCH2fsw94w=; b=dPIyaElBlbZ/LG9cOU9UfWE4lJ7JXTsGx5wogHhPBN66o8AV8z2AQPHOtLb/7n5ngK DAEWAaTmFSaHJu8uTdNGbLel1288Jnzn0W2/LTO2rzTUEtJzXXPC8juRJlNPcJzHQ3zu 29LngSORKppz6OpGHnE9qO6rcVvcGntf3sSChcMkO2nz0NpfAM0N7DxgwFYBcebYPyFA 4NZAnRxrd3nCiww6Y9sLRySGEAg0xwL4P+XGNT9akntTj0aQqKtrAHZa2f5Xbx9Gw5T+ hilIpCFdh8u3NeA/BhjG072hkl+fijKBZ2mjQCyAHuTkkYTzoiBe26WkrlM2BezaRdir NVrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Eb8MPksc; 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 w18si9694570edq.44.2020.06.15.13.19.56; Mon, 15 Jun 2020 13:20:18 -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=Eb8MPksc; 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 S1731585AbgFOURF (ORCPT + 99 others); Mon, 15 Jun 2020 16:17:05 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:38230 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731549AbgFOURE (ORCPT ); Mon, 15 Jun 2020 16:17:04 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 05FKGxNJ064405; Mon, 15 Jun 2020 15:16:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1592252219; bh=9rbi449bFmHQundQ8dlXaifDs/ndof179QCH2fsw94w=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Eb8MPksce/jP7ndV4DaZndHOSdAGtyANgYLM2h+GWFNBd4DwoIpF/8S6KTU8hmLq2 ZallD2igGEIxOlFDByyPFrqHVkeklasATUTaaAjmlUg7xep7pThjJ3evcJ1O8swIH3 GRsCCUpxajZoL1rt9ysHioRis4+PHW53LBUEsLRs= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 05FKGxq0086722 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 15 Jun 2020 15:16:59 -0500 Received: from DFLE101.ent.ti.com (10.64.6.22) 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.1979.3; Mon, 15 Jun 2020 15:16:59 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE101.ent.ti.com (10.64.6.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; Mon, 15 Jun 2020 15:16:59 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 05FKGx5U063850; Mon, 15 Jun 2020 15:16:59 -0500 From: Dan Murphy To: , , CC: , , , Dan Murphy Subject: [RESEND PATCH v27 14/15] leds: lp55xx: Fix file permissions to use DEVICE_ATTR macros Date: Mon, 15 Jun 2020 15:15:21 -0500 Message-ID: <20200615201522.19677-15-dmurphy@ti.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200615201522.19677-1-dmurphy@ti.com> References: <20200615201522.19677-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 d33564aef563..59c3234ba1d7 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, @@ -271,7 +270,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) { @@ -281,7 +280,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) { @@ -323,7 +322,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) { @@ -348,9 +347,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.26.2