| From | Marek Behún <> | Subject | [PATCH leds v2 13/50] leds: bcm6358: cosmetic: use reverse christmas tree | Date | Fri, 18 Sep 2020 00:33:01 +0200 |
| |
Only a cosmetic change: use reverse christmas tree variables declaration.
Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: Álvaro Fernández Rojas <noltari@gmail.com> Cc: Kevin Cernekee <cernekee@gmail.com> Cc: Jaedon Shin <jaedon.shin@gmail.com> --- 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
|