From patchwork Mon Jun 15 20:15:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 187964 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp3052962ilo; Mon, 15 Jun 2020 13:17:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwOCwi+DCROweNxQXQz1gnsUZc1jMeKb8ndK8/tWlK2k9FPHtwJC0zxWBgTVHY3pgs2RAU X-Received: by 2002:a50:a694:: with SMTP id e20mr15448505edc.144.1592252230113; Mon, 15 Jun 2020 13:17:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592252230; cv=none; d=google.com; s=arc-20160816; b=gvqEoawa7yaYeyKWoQ0mK1eXwg4ERLHKwP377wpHq8zBCW1etQ38+cDh8d6TAkaDTh TsCec6eSJLWThiceK6JGwM5BiSyA+kH5G2QlkNtAi37rdr623VD+4xO0mddEtj+HUjMS 85DrR2KKYckwSx0/a7T6rzovP2AO0edg1mYxzZOF5g2ETGewKhRwzu+LDt/FbhaHqXS3 mKPFAD9SEYP6fVF6trb0ya7L6+Age4WiRbCo/CEONqnYTIt/gO5oSIKUcHmPxSpOC15l RAMK3hmzUlQ5QhNMtfJtNnJNt3DA6rTD+02fGfS9OCpaVk26H/oB16ZwRQgOfj+tLbr2 PzDQ== 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=l+2EXU0SdW6lSwq8yyj3WTAtMcR9sfMb7Mj7Hs+tH06PzrJd8++Uy97UUE1zcugv08 +iz3uoT8JfWwxzn1DWV7cdoop+DIjfENGwr0RhmIm6OhXKpu96znSHL6kcutaZndcfm7 /K69nzZ6DyuTFzH3EFdm8BNNHAvI3WvnNwv17XqYL3GS/uvztUtoXOL83KzPvixPoNVx h0Zxzg4Kgz15ARsTG2xJBbexigykD9CvqjqG6D26XhTKpjonRpBwdcn9mAf6Uvwn3lEv XJiLklGpL22rjT1vGOq9EWYWPHUJwvBzE3y3Ce/g0dKGA1sYbjkRfzXe17t6HFQIEkb9 xRWA== 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 devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 p13si9717493ejf.178.2020.06.15.13.17.09; Mon, 15 Jun 2020 13:17:10 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-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 devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 S1731581AbgFOURE (ORCPT + 6 others); Mon, 15 Jun 2020 16:17:04 -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 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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(-) -- 2.26.2 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,