summaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-tca6507.c
diff options
context:
space:
mode:
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;