Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1689881
| From | Sakari Ailus <sakari.ailus@iki.fi> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v7 2/3] media: i2c: adv748x: add adv748x driver |
| Date | 2017-07-18 10:50 +0200 |
| Message-ID | <u4wmC-51-17@gated-at.bofh.it> (permalink) |
| References | <u0cPv-3uf-17@gated-at.bofh.it> <u0cPw-3uf-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Kieran,
A few more minor matters that you might want to address on top of Hans's
pull request.
On Thu, Jul 06, 2017 at 12:01:16PM +0100, Kieran Bingham wrote:
...
> +static int adv748x_afe_g_input_status(struct v4l2_subdev *sd, u32 *status)
> +{
> + struct adv748x_afe *afe = adv748x_sd_to_afe(sd);
> + struct adv748x_state *state = adv748x_afe_to_state(afe);
> + int ret;
> +
> + mutex_lock(&state->mutex);
> +
> + ret = adv748x_afe_status(afe, status, NULL);
> +
> + mutex_unlock(&state->mutex);
A newline here would be nice.
> + return ret;
> +}
...
> +int adv748x_csi2_set_pixelrate(struct v4l2_subdev *sd, s64 rate)
> +{
> + struct v4l2_ctrl *ctrl;
> +
> + ctrl = v4l2_ctrl_find(sd->ctrl_handler, V4L2_CID_PIXEL_RATE);
It'd be much nicer to store the control pointer to your device's own struct
and use it. No need to look it up or check whether it was found.
> + if (!ctrl)
> + return -EINVAL;
> +
> + return v4l2_ctrl_s_ctrl_int64(ctrl, rate);
> +}
--
Kind regards,
Sakari Ailus
e-mail: sakari.ailus@iki.fi XMPP: sailus@retiisi.org.uk
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v7 0/3] ADV748x HDMI/Analog video receiver Kieran Bingham <kbingham@kernel.org> - 2017-07-06 13:10 +0200 Re: [PATCH v7 2/3] media: i2c: adv748x: add adv748x driver Sakari Ailus <sakari.ailus@iki.fi> - 2017-07-18 10:50 +0200
csiph-web