summaryrefslogtreecommitdiff
path: root/drivers/of
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-07-09 00:45:38 +0300
committerRob Herring <robh@kernel.org>2022-07-12 02:08:15 +0300
commit652081b3c64e03ae3229dd33923d295f9f3115db (patch)
treed8c580c797f98788ecf2bfd5233f8eda25f964ea /drivers/of
parent912cbf13a5445ca4a89d35b638795058dab61cce (diff)
downloadlinux-652081b3c64e03ae3229dd33923d295f9f3115db.tar.xz
of: unittest: Switch to use fwnode instead of of_node
The OF node in the GPIO library is deprecated and soon will be removed. GPIO library now accepts fwnode as a firmware node, so switch the module to use it instead. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Bartosz Golaszewski <brgl@bgdev.pl> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20220708214539.7254-1-andriy.shevchenko@linux.intel.com
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/unittest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 7f6bba18c515..5a842dfc27e8 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -1602,7 +1602,7 @@ static int unittest_gpio_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, devptr);
- devptr->chip.of_node = pdev->dev.of_node;
+ devptr->chip.fwnode = dev_fwnode(&pdev->dev);
devptr->chip.label = "of-unittest-gpio";
devptr->chip.base = -1; /* dynamic allocation */
devptr->chip.ngpio = 5;
@@ -1611,7 +1611,7 @@ static int unittest_gpio_probe(struct platform_device *pdev)
ret = gpiochip_add_data(&devptr->chip, NULL);
unittest(!ret,
- "gpiochip_add_data() for node @%pOF failed, ret = %d\n", devptr->chip.of_node, ret);
+ "gpiochip_add_data() for node @%pfw failed, ret = %d\n", devptr->chip.fwnode, ret);
if (!ret)
unittest_gpio_probe_pass_count++;