Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp755542pxk; Thu, 17 Sep 2020 15:40:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEIyU8ZDg50nuhXz6U/o6u05e6HJ+vq2qMOJtUehhmulgGX55Rp5OgyzDTjH74P/hRSa3Q X-Received: by 2002:a05:6402:6c1:: with SMTP id n1mr36278627edy.215.1600382422072; Thu, 17 Sep 2020 15:40:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600382422; cv=none; d=google.com; s=arc-20160816; b=YtnTS3XaGITtcG/MtYWFXSVTGyELIpQx3bUKnLB62ZTyZr3TWhLmMzkjFruuvDScbJ FdXvotKhEEkaa1a7GELo2gLq9oUquH4WGkopqfd/hYwKP9fRkfMejxnYBpHa1tlhBIfw 7C7y984lUc4LTyqKwAFFe8atCjMdO6onRIvyhZJ+p75itzBogB2u6a5ySpMheqNogdff b2mZ0wKxQPWPZuWbPyKP/+WOEhFaCHDQJkblHKDQYoFuvnqjmGt8ydCWlEghRQ3ZoIjZ MSR/BgipnDXZ44s2CfuvwR0R/sIIhZy6jlM0IfwyeU1LRDPmoelEM/3zwhmNSiSJSJ9D e7bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qu0M9iXkKpeIdpc+HQC6616Hl7YTs/SFmdpTWl8F9+c=; b=VSrBkiAx0inQ5VZs/UqEDfm9bP0OZxk4OPgOhfZzzpiS+TbmsWuO5G2Vzili7NTZwY zj7VuovZs12Dtb8aX1vap2HpfHE86L6q5YbSctDK0XWKtxW4sap5K4aQF7Pxx1R3oyyY 7zOmlO9BEPd9gP0eo+xKIEbFo7k6a0PeYJq+HWplbCM68cPuyA61xWaASWZG1I1m54yW fNGGVjtB5ws9dUL5Uk+KoV79OHjr8+fr+YJRqnm0IE9xucIn7DsIXIvKx8tKnGDHNRPN /2S59zshrF/wra1i1cndKn0UlqjqKnDxD9FIIC3/lokZvC91/maQvM01cJHCuycaLe8Y uVRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nic.cz header.s=default header.b=lQ8Q1J3n; 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=NONE sp=NONE dis=NONE) header.from=nic.cz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u16si887431ejr.4.2020.09.17.15.39.58; Thu, 17 Sep 2020 15:40:22 -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=@nic.cz header.s=default header.b=lQ8Q1J3n; 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=NONE sp=NONE dis=NONE) header.from=nic.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726841AbgIQWgX (ORCPT + 99 others); Thu, 17 Sep 2020 18:36:23 -0400 Received: from lists.nic.cz ([217.31.204.67]:35608 "EHLO mail.nic.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726168AbgIQWeE (ORCPT ); Thu, 17 Sep 2020 18:34:04 -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 8A7DE140AA3; Fri, 18 Sep 2020 00:33:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1600382035; bh=AREUEGn1RuUtTfOukJ/Urgj0JfOX/IrUKRwB+urWhqs=; h=From:To:Date; b=lQ8Q1J3nSjE0S7+Y2/5BamLdRgKNxGMY4nUYOXlUWamsV578/PinjXpkT6YmsCegD trIKUFaPc3FqXvD4Zblbs21W0ZIM7/fu/QcQ/hKvsbkej7lMPE1SJP4zVxBIDd3/2O rq0slxvPlWJezZgFlCite+u7bksQVBX8s7yMTMCc= From: =?UTF-8?q?Marek=20Beh=C3=BAn?= To: linux-leds@vger.kernel.org Cc: Pavel Machek , Dan Murphy , =?UTF-8?q?Ond=C5=99ej=20Jirman?= , linux-kernel@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org, =?UTF-8?q?Marek=20Beh=C3=BAn?= , =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= , Kevin Cernekee , Jaedon Shin Subject: [PATCH leds v2 13/50] leds: bcm6358: cosmetic: use reverse christmas tree Date: Fri, 18 Sep 2020 00:33:01 +0200 Message-Id: <20200917223338.14164-14-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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.nic.cz X-Spam-Status: No, score=0.00 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-kernel@vger.kernel.org Only a cosmetic change: use reverse christmas tree variables declaration. Signed-off-by: Marek Behún Cc: Álvaro Fernández Rojas Cc: Kevin Cernekee Cc: Jaedon Shin --- drivers/leds/leds-bcm6358.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/leds/leds-bcm6358.c b/drivers/leds/leds-bcm6358.c index 49f703c59ecdc..71c49d5fa811f 100644 --- a/drivers/leds/leds-bcm6358.c +++ b/drivers/leds/leds-bcm6358.c @@ -150,11 +150,10 @@ static int bcm6358_led(struct device *dev, struct device_node *nc, u32 reg, static int bcm6358_leds_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct device_node *np = dev_of_node(&pdev->dev); - struct device_node *child; + struct device_node *np, *child; void __iomem *mem; - spinlock_t *lock; /* memory lock */ unsigned long val; + spinlock_t *lock; /* memory lock */ u32 clk_div; mem = devm_platform_ioremap_resource(pdev, 0); @@ -167,6 +166,8 @@ static int bcm6358_leds_probe(struct platform_device *pdev) spin_lock_init(lock); + np = dev_of_node(dev); + val = bcm6358_led_busy(mem); val &= ~(BCM6358_SLED_POLARITY | BCM6358_SLED_CLKDIV_MASK); if (of_property_read_bool(np, "brcm,clk-dat-low")) @@ -189,8 +190,8 @@ static int bcm6358_leds_probe(struct platform_device *pdev) bcm6358_led_write(mem + BCM6358_REG_CTRL, val); for_each_available_child_of_node(np, child) { - int rc; u32 reg; + int rc; if (of_property_read_u32(child, "reg", ®)) continue; -- 2.26.2