Message ID | 1473938551-14503-10-git-send-email-sakari.ailus@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi, On Thu, Sep 15, 2016 at 02:22:23PM +0300, Sakari Ailus wrote: > The information gathered during frame format reading will be required > earlier in the initialisation when it was available. Also return an error > if frame format cannot be obtained. > > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> > --- > drivers/media/i2c/smiapp/smiapp-core.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c > index 0b5671c..c9aee83 100644 > --- a/drivers/media/i2c/smiapp/smiapp-core.c > +++ b/drivers/media/i2c/smiapp/smiapp-core.c > @@ -2890,6 +2890,12 @@ static int smiapp_probe(struct i2c_client *client, > goto out_power_off; > } > > + rval = smiapp_read_frame_fmt(sensor); > + if (rval) { > + rval = -ENODEV; > + goto out_power_off; > + } > + > /* > * Handle Sensor Module orientation on the board. > * > @@ -3013,8 +3019,6 @@ static int smiapp_probe(struct i2c_client *client, > > sensor->pixel_array->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR; > > - /* final steps */ > - smiapp_read_frame_fmt(sensor); > rval = smiapp_init_controls(sensor); > if (rval < 0) > goto out_cleanup; Is this missing a Fixes tag, or will it only be required earlier for future patches? -- Sebastian
Hi Sebastian, Sebastian Reichel wrote: > Hi, > > On Thu, Sep 15, 2016 at 02:22:23PM +0300, Sakari Ailus wrote: >> The information gathered during frame format reading will be required >> earlier in the initialisation when it was available. Also return an error >> if frame format cannot be obtained. >> >> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> >> --- >> drivers/media/i2c/smiapp/smiapp-core.c | 8 ++++++-- >> 1 file changed, 6 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c >> index 0b5671c..c9aee83 100644 >> --- a/drivers/media/i2c/smiapp/smiapp-core.c >> +++ b/drivers/media/i2c/smiapp/smiapp-core.c >> @@ -2890,6 +2890,12 @@ static int smiapp_probe(struct i2c_client *client, >> goto out_power_off; >> } >> >> + rval = smiapp_read_frame_fmt(sensor); >> + if (rval) { >> + rval = -ENODEV; >> + goto out_power_off; >> + } >> + >> /* >> * Handle Sensor Module orientation on the board. >> * >> @@ -3013,8 +3019,6 @@ static int smiapp_probe(struct i2c_client *client, >> >> sensor->pixel_array->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR; >> >> - /* final steps */ >> - smiapp_read_frame_fmt(sensor); >> rval = smiapp_init_controls(sensor); >> if (rval < 0) >> goto out_cleanup; > > Is this missing a Fixes tag, or will it only be required earlier for > future patches? It's primarily for future patches. Reading the frame format will require limits but hardly any other information. On the other hand, the frame format will very likely be needed elsewhere, hence the move. The missing return value check is just a bug which I believe has been there since around 2011.
Hi, On Tue, Sep 20, 2016 at 12:19:54AM +0300, Sakari Ailus wrote: > Hi Sebastian, > > Sebastian Reichel wrote: > > Hi, > > > > On Thu, Sep 15, 2016 at 02:22:23PM +0300, Sakari Ailus wrote: > > > The information gathered during frame format reading will be required > > > earlier in the initialisation when it was available. Also return an error > > > if frame format cannot be obtained. > > > > > > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> > > > --- > > > drivers/media/i2c/smiapp/smiapp-core.c | 8 ++++++-- > > > 1 file changed, 6 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c > > > index 0b5671c..c9aee83 100644 > > > --- a/drivers/media/i2c/smiapp/smiapp-core.c > > > +++ b/drivers/media/i2c/smiapp/smiapp-core.c > > > @@ -2890,6 +2890,12 @@ static int smiapp_probe(struct i2c_client *client, > > > goto out_power_off; > > > } > > > > > > + rval = smiapp_read_frame_fmt(sensor); > > > + if (rval) { > > > + rval = -ENODEV; > > > + goto out_power_off; > > > + } > > > + > > > /* > > > * Handle Sensor Module orientation on the board. > > > * > > > @@ -3013,8 +3019,6 @@ static int smiapp_probe(struct i2c_client *client, > > > > > > sensor->pixel_array->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR; > > > > > > - /* final steps */ > > > - smiapp_read_frame_fmt(sensor); > > > rval = smiapp_init_controls(sensor); > > > if (rval < 0) > > > goto out_cleanup; > > > > Is this missing a Fixes tag, or will it only be required earlier for > > future patches? > > It's primarily for future patches. Reading the frame format will require > limits but hardly any other information. On the other hand, the frame format > will very likely be needed elsewhere, hence the move. > > The missing return value check is just a bug which I believe has been there > since around 2011. ok, so the move is for future patches. Then Reviewed-By: Sebastian Reichel <sre@kernel.org> -- Sebastian
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 0b5671c..c9aee83 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -2890,6 +2890,12 @@ static int smiapp_probe(struct i2c_client *client, goto out_power_off; } + rval = smiapp_read_frame_fmt(sensor); + if (rval) { + rval = -ENODEV; + goto out_power_off; + } + /* * Handle Sensor Module orientation on the board. * @@ -3013,8 +3019,6 @@ static int smiapp_probe(struct i2c_client *client, sensor->pixel_array->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR; - /* final steps */ - smiapp_read_frame_fmt(sensor); rval = smiapp_init_controls(sensor); if (rval < 0) goto out_cleanup;
The information gathered during frame format reading will be required earlier in the initialisation when it was available. Also return an error if frame format cannot be obtained. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> --- drivers/media/i2c/smiapp/smiapp-core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)