Re: [PATCH v1 1/1] iio: core: Convert to use firmware node handle instead of OF node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux