[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YlcRTB9W6Ggzt7vp@smile.fi.intel.com>
Date: Wed, 13 Apr 2022 21:07:08 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Jonathan Cameron <Jonathan.Cameron@...wei.com>,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Jonathan Cameron <jic23@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>
Subject: Re: [PATCH v1 1/1] iio: core: Convert to use firmware node handle
instead of OF node
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
Powered by blists - more mailing lists