Re: [PATCH v14 13/18] media: i2c: ds90ub953: Use v4l2_fwnode_endpoint_parse()

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

 



On Fri, Jun 16, 2023 at 04:59:17PM +0300, Tomi Valkeinen wrote:
> Use v4l2_fwnode_endpoint_parse() to parse the sink endpoint parameters.

> +	nlanes = vep.bus.mipi_csi2.num_data_lanes;
>  

I would also drop this blank line now.

> -	if (ret != 1 && ret != 2 && ret != 4)
> +	if (nlanes != 1 && nlanes != 2 && nlanes != 4)

Isn't the following cleaner?

	if (!is_power_of_2(nlanes) || nlanes > 4)

>  		return dev_err_probe(dev, -EINVAL,
> -				     "bad number of data-lanes: %d\n", ret);
> +				     "bad number of data-lanes: %d\n", nlanes);

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux