From 8853c95e997e0a3621bd8718bdaded81ed37bc9a Mon Sep 17 00:00:00 2001 From: Marek BehĂșn <marek.behun@nic.cz> Date: Fri, 18 Sep 2020 00:32:54 +0200 Subject: leds: various: use dev_of_node(dev) instead of dev->of_node MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The dev_of_node function should be preferred. Signed-off-by: Marek BehĂșn <marek.behun@nic.cz> Cc: Orson Zhai <orsonzhai@gmail.com> Cc: Baolin Wang <baolin.wang7@gmail.com> Cc: Chunyan Zhang <zhang.lyra@gmail.com> Cc: Sean Wang <sean.wang@mediatek.com> Cc: Matthias Brugger <matthias.bgg@gmail.com> Cc: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Pavel Machek <pavel@ucw.cz> --- drivers/leds/leds-is31fl32xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/leds/leds-is31fl32xx.c') diff --git a/drivers/leds/leds-is31fl32xx.c b/drivers/leds/leds-is31fl32xx.c index acf51e17e8df..82bbf0290ff9 100644 --- a/drivers/leds/leds-is31fl32xx.c +++ b/drivers/leds/leds-is31fl32xx.c @@ -372,7 +372,7 @@ static int is31fl32xx_parse_dt(struct device *dev, struct device_node *child; int ret = 0; - for_each_child_of_node(dev->of_node, child) { + for_each_child_of_node(dev_of_node(dev), child) { struct is31fl32xx_led_data *led_data = &priv->leds[priv->num_leds]; const struct is31fl32xx_led_data *other_led_data; @@ -435,7 +435,7 @@ static int is31fl32xx_probe(struct i2c_client *client, cdef = device_get_match_data(dev); - count = of_get_child_count(dev->of_node); + count = of_get_child_count(dev_of_node(dev)); if (!count) return -EINVAL; -- cgit v1.2.3