[PATCH leds v2 13/50] leds: bcm6358: cosmetic: use reverse christmas tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Only a cosmetic change: use reverse christmas tree variables
declaration.

Signed-off-by: Marek Behún <marek.behun@xxxxxx>
Cc: Álvaro Fernández Rojas <noltari@xxxxxxxxx>
Cc: Kevin Cernekee <cernekee@xxxxxxxxx>
Cc: Jaedon Shin <jaedon.shin@xxxxxxxxx>
---
 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", &reg))
 			continue;
-- 
2.26.2




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux