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
This commit is contained in:
parent
912cbf13a5
commit
652081b3c6
@ -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++;
|
||||
|
Loading…
Reference in New Issue
Block a user