summaryrefslogtreecommitdiff
path: root/drivers/leds/leds-tca6507.c
diff options
context:
space:
mode:
authorMarek BehĂșn <marek.behun@nic.cz>2020-09-18 01:32:54 +0300
committerPavel Machek <pavel@ucw.cz>2020-09-26 22:56:39 +0300
commit8853c95e997e0a3621bd8718bdaded81ed37bc9a (patch)
treef0bd3a4907901243e12ce8a18caf1a8d313e7f3c /drivers/leds/leds-tca6507.c
parent2779f4724b2ff0f296313e5987d10a6ec2c2ebd5 (diff)
downloadlinux-8853c95e997e0a3621bd8718bdaded81ed37bc9a.tar.xz
leds: various: use dev_of_node(dev) instead of dev->of_node
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>
Diffstat (limited to 'drivers/leds/leds-tca6507.c')
-rw-r--r--drivers/leds/leds-tca6507.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/leds/leds-tca6507.c b/drivers/leds/leds-tca6507.c
index 1128ac75443c..d44b64af6d6e 100644
--- a/drivers/leds/leds-tca6507.c
+++ b/drivers/leds/leds-tca6507.c
@@ -656,7 +656,7 @@ static int tca6507_probe_gpios(struct i2c_client *client,
tca->gpio.set = tca6507_gpio_set_value;
tca->gpio.parent = &client->dev;
#ifdef CONFIG_OF_GPIO
- tca->gpio.of_node = of_node_get(client->dev.of_node);
+ tca->gpio.of_node = of_node_get(dev_of_node(&client->dev));
#endif
err = gpiochip_add_data(&tca->gpio, tca);
if (err) {
@@ -689,7 +689,7 @@ static void tca6507_remove_gpio(struct tca6507_chip *tca)
static struct tca6507_platform_data *
tca6507_led_dt_init(struct i2c_client *client)
{
- struct device_node *np = client->dev.of_node, *child;
+ struct device_node *np = dev_of_node(&client->dev), *child;
struct tca6507_platform_data *pdata;
struct led_info *tca_leds;
int count;