Re: [PATCH v1 1/1] iio: core: Convert to use firmware node handle instead of OF node
From: Andy Shevchenko
Date: Wed Apr 13 2022 - 14:11:08 EST
On Wed, Apr 13, 2022 at 09:02:02PM +0300, Andy Shevchenko wrote:
...
> + /* If the calling driver did not initialize firmware node, do it here */
> + if (dev_fwnode(&indio_dev->dev))
> + fwnode = dev_fwnode(&indio_dev->dev);
> + else
> + fwnode = dev_fwnode(indio_dev->dev.parent);
Can be also done as
fwnode = dev_fwnode(&indio_dev->dev) ?: dev_fwnode(indio_dev->dev.parent);
--
With Best Regards,
Andy Shevchenko