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>
This commit is contained in:
Родитель
7db52e252a
Коммит
3b9b4357d5
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче