From patchwork Tue Oct 1 18:04:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 174920 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp8889991ill; Tue, 1 Oct 2019 11:04:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxuZudMsgLUj8JEh/bYG9bVJa66BhvdvN03I/9xOWJEYj3eXVn+pdQOcJwWiAz/tzqaga8Q X-Received: by 2002:a50:c052:: with SMTP id u18mr27039118edd.88.1569953075162; Tue, 01 Oct 2019 11:04:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569953075; cv=none; d=google.com; s=arc-20160816; b=yZMM3+U15a5++pefB5LJnnDzJMEHi56Al4dUHAny7jucJfO9xjRgS/YXZ0ZNzDvoRP c2IGAqO0ML6GZ0G0U90Lz9XDWPNQupUlhOCHmfGptG0yZuU0eFxAsARf+ovhHnB1HRvT x6zL252IqL0iWxh+/FXscCfbm8iSZJSbD7+l9AFtvI44/OcjAcNbWNL9jxWoMVCiRVVO FfM+xflVkbs47eDBoRdiidxhf7YcUs8Px+mY+t6SuIvMCWn37q64yWIC6hANl1sV69R3 RjeHJu54earANlZiw2r3x9fL36CWKpdx5UCCSBRmg1QRK9kJDtHla1n0iSmr/bQFM0x/ Jiww== 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=2GcFghmzbOxrboNekJ5oh9fzsxmTa0oc0n6YrSflEMI=; b=C7Yts3r5h6K+W98AkM7UcpLu5oXi5K8bl8E4dFVq8iQvQ2Dmue08W7GI6MM9xrgke0 B+PRHrAkiWbzcuYBqdLjxEEi+jc8+k9gal7bmt+EWuyr7yJ+AL2SE9mW9OCJ2/0+KTB9 1sRE6bx+sXY4z05Eg/Hpsss7sggbOzU1N8HXc7ANKa/HE8VjBO7X/86uIwYfLvFNGmGF mhMsQGo0j1sQFEWgRIr/v7jncaSrJc3ItpACkUkKsl8P0Ke0DONR91++GQbHK26JWV3p /vbpYWoiRPe6mSvDl0bFxVEZ0mtP9+evbArEYzqWGzHmlvnlkQd4qe3yZHsezwd6SUbT lvfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="BjM/0eE3"; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-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 by16si9106368edb.30.2019.10.01.11.04.35; Tue, 01 Oct 2019 11:04:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-leds-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="BjM/0eE3"; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-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 S1731555AbfJASEd (ORCPT + 1 other); Tue, 1 Oct 2019 14:04:33 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:42210 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726554AbfJASEY (ORCPT ); Tue, 1 Oct 2019 14:04:24 -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 x91I4Jop054153; Tue, 1 Oct 2019 13:04:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1569953059; bh=2GcFghmzbOxrboNekJ5oh9fzsxmTa0oc0n6YrSflEMI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=BjM/0eE31GIF8cYhZhjX2MPveroV0odtGJ5z7GCVwOfZvqviqxbZIhlDV0sylvLkR rZfc9B41ElRHqr+aFMLWc7ArV8v6Cg7Z8rkpsLBL6FCXE/XfJsY6Udvm3XkDrBfbLO tt91laFPzyAFryJUQbvoBDAoKW7rs2BN3StulccI= Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x91I4JMU036210 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 1 Oct 2019 13:04:19 -0500 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 1 Oct 2019 13:04:19 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE111.ent.ti.com (10.64.6.32) 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; Tue, 1 Oct 2019 13:04:19 -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 x91I4J0a075928; Tue, 1 Oct 2019 13:04:19 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH 2/5] leds: flash: Convert non extended registration to inline Date: Tue, 1 Oct 2019 13:04:36 -0500 Message-ID: <20191001180439.8312-2-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191001180439.8312-1-dmurphy@ti.com> References: <20191001180439.8312-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Convert the #define non-extended registration API to an inline function. Signed-off-by: Dan Murphy --- include/linux/led-class-flash.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- 2.22.0.214.g8dca754b1e diff --git a/include/linux/led-class-flash.h b/include/linux/led-class-flash.h index 1e824963af17..7ff287a9e2a2 100644 --- a/include/linux/led-class-flash.h +++ b/include/linux/led-class-flash.h @@ -98,8 +98,11 @@ extern int led_classdev_flash_register_ext(struct device *parent, struct led_classdev_flash *fled_cdev, struct led_init_data *init_data); -#define led_classdev_flash_register(parent, fled_cdev) \ - led_classdev_flash_register_ext(parent, fled_cdev, NULL) +static inline int led_classdev_flash_register(struct device *parent, + struct led_classdev_flash *fled_cdev) +{ + return led_classdev_flash_register_ext(parent, fled_cdev, NULL); +} /** * led_classdev_flash_unregister - unregisters an object of led_classdev class From patchwork Tue Oct 1 18:04:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 174917 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp8889800ill; Tue, 1 Oct 2019 11:04:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqxmzPmIsY5g+Gv6LIBDPEZVFSwYl7PGJiySBIChdoYfHpg6bfyrPqEqOb6otNT1CukW5ntw X-Received: by 2002:a05:6402:696:: with SMTP id f22mr26880716edy.216.1569953066230; Tue, 01 Oct 2019 11:04:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569953066; cv=none; d=google.com; s=arc-20160816; b=qKYBXRr+Jx6Ass4OId0HPoAUaE563NArMB1fdu7tQBw4A829eTNKqcTrx1QGQmnb48 LS8qAPaeaP0/3ZcNw1kQTx1kiPAKNraHxIxvnByRJN9tDy6B7E6Y532PZXZTt0KIt8R6 0mD+MIYnPXlRg9MvjV0n5HGbFeH5MfZ1hYRPJ+cv24mz36dlqoc+W3pQJxbjy/7i6Wc+ BsZ5KvRQs/BVx4eIS2eug2LGO3hflkW3XJbNkmXbUcQtkphVuav6KdTP2d7qMsSfwgWu r8szIzPP4Cx5Et8daNYdyQ7Ut307lmyL2wA63nto14sOy2oiYEtrNpRnqeUFsBxkKrAx pN7g== 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=GGDOyQL+13uGomQIzn17lPQZjfrmmobRzDF35QsnYtE=; b=gqZFY/fig4M86BkK2XAZPevYRmK/ZHbcjas/2ki96Ww+QY6o7a6apcACQ4ym4ZC79r AN6pK1pygvWCEN/GV2W8R1+d3RS90EfeQ3TYhVtz00aWv3Cy597ZHXRw9yDUFici7AzY 7K8BXO3r0sScqes4HYpdpZVQ0jgNtrcLBvkeoO7W5VHnmnkxr7yGTRbK+0EF/r4NNUTD 45d5tzEp8jeQ4Jz43DtUzXjd2z8e8UOZ7lz6cO1Hf33De5lbnRO08yTZZmjvN1n587nq GbmV9xNrqDx62a5W+vYm+vx8fEaP9hesu2BMQBNNWBSRRHbOplwZObgzF8VJtuMKPSCe Z1PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=G7aZZl8T; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-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 x14si9146397edq.49.2019.10.01.11.04.26; Tue, 01 Oct 2019 11:04:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-leds-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=G7aZZl8T; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-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 S1727562AbfJASEY (ORCPT + 1 other); Tue, 1 Oct 2019 14:04:24 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:37688 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727536AbfJASEX (ORCPT ); Tue, 1 Oct 2019 14:04:23 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x91I4JCx039866; Tue, 1 Oct 2019 13:04:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1569953060; bh=GGDOyQL+13uGomQIzn17lPQZjfrmmobRzDF35QsnYtE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=G7aZZl8TjDZUPebnntJYia0rvpwZrWt9tckxhEtPSyPDXuD3pMm+HPNWM/30ndW62 lriQiXdWk6JpjkAn0CLMogGqoGH2WOteYyZRgx0foaEfwlhfPgns5/DqkAP66A5jBq LP8W+UVFNs9aVqJSe6k4I8mJKr8K42XZk90/OhuU= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x91I4J1O025096 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 1 Oct 2019 13:04:19 -0500 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 1 Oct 2019 13:04:09 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE115.ent.ti.com (157.170.170.26) 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; Tue, 1 Oct 2019 13:04:19 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x91I4JZp126163; Tue, 1 Oct 2019 13:04:19 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH 3/5] leds: flash: Remove extern from the header file Date: Tue, 1 Oct 2019 13:04:37 -0500 Message-ID: <20191001180439.8312-3-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191001180439.8312-1-dmurphy@ti.com> References: <20191001180439.8312-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org extern is implied and is not needed in the header file. Remove the extern keyword and re-align the code. Signed-off-by: Dan Murphy --- include/linux/led-class-flash.h | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) -- 2.22.0.214.g8dca754b1e diff --git a/include/linux/led-class-flash.h b/include/linux/led-class-flash.h index 7ff287a9e2a2..1bd83159fa4c 100644 --- a/include/linux/led-class-flash.h +++ b/include/linux/led-class-flash.h @@ -94,12 +94,12 @@ static inline struct led_classdev_flash *lcdev_to_flcdev( * * Returns: 0 on success or negative error value on failure */ -extern int led_classdev_flash_register_ext(struct device *parent, - struct led_classdev_flash *fled_cdev, - struct led_init_data *init_data); +int led_classdev_flash_register_ext(struct device *parent, + struct led_classdev_flash *fled_cdev, + struct led_init_data *init_data); static inline int led_classdev_flash_register(struct device *parent, - struct led_classdev_flash *fled_cdev) + struct led_classdev_flash *fled_cdev) { return led_classdev_flash_register_ext(parent, fled_cdev, NULL); } @@ -111,7 +111,7 @@ static inline int led_classdev_flash_register(struct device *parent, * * Unregister a previously registered via led_classdev_flash_register object */ -extern void led_classdev_flash_unregister(struct led_classdev_flash *fled_cdev); +void led_classdev_flash_unregister(struct led_classdev_flash *fled_cdev); /** * led_set_flash_strobe - setup flash strobe @@ -159,8 +159,8 @@ static inline int led_get_flash_strobe(struct led_classdev_flash *fled_cdev, * * Returns: 0 on success or negative error value on failure */ -extern int led_set_flash_brightness(struct led_classdev_flash *fled_cdev, - u32 brightness); +int led_set_flash_brightness(struct led_classdev_flash *fled_cdev, + u32 brightness); /** * led_update_flash_brightness - update flash LED brightness @@ -171,7 +171,7 @@ extern int led_set_flash_brightness(struct led_classdev_flash *fled_cdev, * * Returns: 0 on success or negative error value on failure */ -extern int led_update_flash_brightness(struct led_classdev_flash *fled_cdev); +int led_update_flash_brightness(struct led_classdev_flash *fled_cdev); /** * led_set_flash_timeout - set flash LED timeout @@ -182,8 +182,7 @@ extern int led_update_flash_brightness(struct led_classdev_flash *fled_cdev); * * Returns: 0 on success or negative error value on failure */ -extern int led_set_flash_timeout(struct led_classdev_flash *fled_cdev, - u32 timeout); +int led_set_flash_timeout(struct led_classdev_flash *fled_cdev, u32 timeout); /** * led_get_flash_fault - get the flash LED fault @@ -194,7 +193,6 @@ extern int led_set_flash_timeout(struct led_classdev_flash *fled_cdev, * * Returns: 0 on success or negative error value on failure */ -extern int led_get_flash_fault(struct led_classdev_flash *fled_cdev, - u32 *fault); +int led_get_flash_fault(struct led_classdev_flash *fled_cdev, u32 *fault); #endif /* __LINUX_FLASH_LEDS_H_INCLUDED */