Re: [PATCH 30/57] media: atomisp: ov2680: Rework flip ctrls

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

 



On Mon, Jan 23, 2023 at 01:51:38PM +0100, Hans de Goede wrote:
> Rework the flip ctrls to be more like those of mainline (non staging)
> drivers.
> 
> This is modelled after the main ov2680 and ov5693 drivers. This also
> introduces __ov2680_get_pad_format() to make the ov2680 code more compliant
> with the mainline v4l2-subdev APIs.
> 
> Note the OV2680_FLIP_REG and OV2680_MIRROR_REG defines are renamed to
> OV2680_REG_FORMAT1 and OV2680_REG_FORMAT2 to match the datasheet.

...

> +static inline struct v4l2_subdev *ctrl_to_sd(struct v4l2_ctrl *ctrl)
> +{
> +	return &container_of(ctrl->handler, struct ov2680_device,
> +			     ctrls.handler)->sd;

I would unroll this for better readability.


	struct ov2680_device *ovd =
		container_of(ctrl->handler, struct ov2680_device, ctrls.handler);

	return &ovd->sd;

> +}

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux