diff options
author | Marek BehĂșn <marek.behun@nic.cz> | 2020-09-18 00:33:07 +0200 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 2020-09-26 21:56:40 +0200 |
commit | b23ca98af6114ee24b3ba085514677db4bfda53c (patch) | |
tree | d23ecb9cf01f227c9b298eacdbcec7e43b3e91d4 /drivers/leds/leds-mt6323.c | |
parent | leds: mt6323: use struct led_init_data when registering (diff) | |
download | linux-b23ca98af6114ee24b3ba085514677db4bfda53c.tar.xz linux-b23ca98af6114ee24b3ba085514677db4bfda53c.zip |
leds: mt6323: cosmetic change: use helper variable
Use helper variable dev instead of always writing &pdev->dev.
Signed-off-by: Marek BehĂșn <marek.behun@nic.cz>
Cc: Sean Wang <sean.wang@mediatek.com>
Cc: John Crispin <john@phrozen.org>
Cc: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'drivers/leds/leds-mt6323.c')
-rw-r--r-- | drivers/leds/leds-mt6323.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/leds/leds-mt6323.c b/drivers/leds/leds-mt6323.c index f61ad8448351..a1fceeb41d7e 100644 --- a/drivers/leds/leds-mt6323.c +++ b/drivers/leds/leds-mt6323.c @@ -368,9 +368,9 @@ static int mt6323_led_set_dt_default(struct led_classdev *cdev, static int mt6323_led_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct device_node *np = dev_of_node(&pdev->dev); + struct device_node *np = dev_of_node(dev); struct device_node *child; - struct mt6397_chip *hw = dev_get_drvdata(pdev->dev.parent); + struct mt6397_chip *hw = dev_get_drvdata(dev->parent); struct mt6323_leds *leds; struct mt6323_led *led; int ret; @@ -443,8 +443,7 @@ static int mt6323_led_probe(struct platform_device *pdev) ret = devm_led_classdev_register_ext(dev, &leds->led[reg]->cdev, &init_data); if (ret) { - dev_err(&pdev->dev, "Failed to register LED: %d\n", - ret); + dev_err(dev, "Failed to register LED: %d\n", ret); goto put_child_node; } } |