Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751440AbdGRIlh (ORCPT ); Tue, 18 Jul 2017 04:41:37 -0400 Received: from nblzone-211-213.nblnetworks.fi ([83.145.211.213]:50204 "EHLO hillosipuli.retiisi.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751334AbdGRIle (ORCPT ); Tue, 18 Jul 2017 04:41:34 -0400 Date: Tue, 18 Jul 2017 11:41:28 +0300 From: Sakari Ailus To: Kieran Bingham Cc: linux-renesas-soc@vger.kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, laurent.pinchart@ideasonboard.com, kieran.bingham@ideasonboard.com, niklas.soderlund@ragnatech.se, hans.verkuil@cisco.com, Kieran Bingham , Mauro Carvalho Chehab , Sakari Ailus , Steve Longerbeam , Pavel Machek , Rajmohan Mani , Ramesh Shanmugasundaram , Todor Tomov , Ramiro Oliveira , Robert Jarzmik , Hyungwoo Yang Subject: Re: [PATCH v7 2/3] media: i2c: adv748x: add adv748x driver Message-ID: <20170718084128.e3eaio6ua2qf346g@valkosipuli.retiisi.org.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1057 Lines: 46 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