From patchwork Thu Sep 17 22:33:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 255405 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B86EAC43465 for ; Thu, 17 Sep 2020 22:34:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 74A142087D for ; Thu, 17 Sep 2020 22:34:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nic.cz header.i=@nic.cz header.b="TjMBLYd9" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726382AbgIQWeM (ORCPT ); Thu, 17 Sep 2020 18:34:12 -0400 Received: from mail.nic.cz ([217.31.204.67]:35812 "EHLO mail.nic.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726170AbgIQWeJ (ORCPT ); Thu, 17 Sep 2020 18:34:09 -0400 Received: from dellmb.labs.office.nic.cz (unknown [IPv6:2001:1488:fffe:6:cac7:3539:7f1f:463]) by mail.nic.cz (Postfix) with ESMTP id 7772A140A77; Fri, 18 Sep 2020 00:33:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1600382037; bh=NfiKEaEUAJO2bf4FPxglihEBwosP24Qc7Px6/FPjqjo=; h=From:To:Date; b=TjMBLYd9ZwxWUxikfygf7/XJq3tMys5NcxULPRx90XroUUj4XPZeGvopUF+Vzlmxx /TaoiaFUjBm4IDDXQeidcUyioZMVRZixmqF/0ExR8IUhiJtFQbV38FoBHfdlxXhvoa XyAETDA/JN3b3ge7g/oHFpfwAqd/BxQ74hV5NdQA= From: =?utf-8?q?Marek_Beh=C3=BAn?= To: linux-leds@vger.kernel.org Cc: Pavel Machek , Dan Murphy , =?utf-8?q?On?= =?utf-8?q?d=C5=99ej_Jirman?= , linux-kernel@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= , Linus Walleij , Bjorn Andersson Subject: [PATCH leds v2 23/50] leds: pm8058: cosmetic: use reverse christmas tree Date: Fri, 18 Sep 2020 00:33:11 +0200 Message-Id: <20200917223338.14164-24-marek.behun@nic.cz> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200917223338.14164-1-marek.behun@nic.cz> References: <20200917223338.14164-1-marek.behun@nic.cz> MIME-Version: 1.0 X-Spamd-Bar: / X-Virus-Scanned: clamav-milter 0.102.2 at mail X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Only a cosmetic change: use reverse christmas tree variables declaration. Signed-off-by: Marek BehĂșn Cc: Linus Walleij Cc: Bjorn Andersson --- drivers/leds/leds-pm8058.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/leds/leds-pm8058.c b/drivers/leds/leds-pm8058.c index 193780a8c0522..80db7e2de420c 100644 --- a/drivers/leds/leds-pm8058.c +++ b/drivers/leds/leds-pm8058.c @@ -29,9 +29,9 @@ static void pm8058_led_set(struct led_classdev *cled, enum led_brightness value) { struct pm8058_led *led; - int ret = 0; unsigned int mask = 0; unsigned int val = 0; + int ret = 0; led = container_of(cled, struct pm8058_led, cdev); switch (led->ledtype) { @@ -56,8 +56,8 @@ static void pm8058_led_set(struct led_classdev *cled, static enum led_brightness pm8058_led_get(struct led_classdev *cled) { struct pm8058_led *led; - int ret; unsigned int val; + int ret; led = container_of(cled, struct pm8058_led, cdev); @@ -89,12 +89,12 @@ static int pm8058_led_probe(struct platform_device *pdev) { struct led_init_data init_data = {}; struct device *dev = &pdev->dev; + enum led_brightness maxbright; struct pm8058_led *led; struct device_node *np; - int ret; struct regmap *map; const char *state; - enum led_brightness maxbright; + int ret; led = devm_kzalloc(dev, sizeof(*led), GFP_KERNEL); if (!led)