diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2022-05-31 16:53:20 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2022-06-14 13:53:08 +0300 |
commit | 3b9b4357d5b241f4de08135c176b6da39fe82d6a (patch) | |
tree | 508726063800cf47de4a5b0a94572bb3f6d1301a /drivers/iio/dac | |
parent | 7db52e252a2bf0074f513d2477f27248b7a96f96 (diff) | |
download | linux-3b9b4357d5b241f4de08135c176b6da39fe82d6a.tar.xz |
iio: dac: ad5592r: Get rid of OF specifics
Use dev_fwnode() instead of direct OF node dereference when checking
for regulator API error code.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220531135320.63096-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/dac')
-rw-r--r-- | drivers/iio/dac/ad5592r-base.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/dac/ad5592r-base.c b/drivers/iio/dac/ad5592r-base.c index 4434c1b2a322..7a9b5fc1e579 100644 --- a/drivers/iio/dac/ad5592r-base.c +++ b/drivers/iio/dac/ad5592r-base.c @@ -603,7 +603,7 @@ int ad5592r_probe(struct device *dev, const char *name, st->reg = devm_regulator_get_optional(dev, "vref"); if (IS_ERR(st->reg)) { - if ((PTR_ERR(st->reg) != -ENODEV) && dev->of_node) + if ((PTR_ERR(st->reg) != -ENODEV) && dev_fwnode(dev)) return PTR_ERR(st->reg); st->reg = NULL; |