From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966382AbcIHRIx (ORCPT ); Thu, 8 Sep 2016 13:08:53 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.220]:53601 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965152AbcIHRIv (ORCPT ); Thu, 8 Sep 2016 13:08:51 -0400 X-RZG-AUTH: :JGIXVUS7cutRB/49FwqZ7WcecEarQROEYabkiUo6mSAGQ+qKID8zPHsIEsY= X-RZG-CLASS-ID: mo00 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: [PATCH] [media] ov9650: add support for asynchronous probing From: "H. Nikolaus Schaller" In-Reply-To: <1473339940-24572-1-git-send-email-javier@osg.samsung.com> Date: Thu, 8 Sep 2016 19:08:38 +0200 Cc: linux-kernel@vger.kernel.org, Mauro Carvalho Chehab , Arnd Bergmann , Guennadi Liakhovetski , Laurent Pinchart , Hans Verkuil , Andrew Morton , linux-media@vger.kernel.org Message-Id: <28493A99-C0CF-4662-B4EF-6D8A3576593D@goldelico.com> References: <1473339940-24572-1-git-send-email-javier@osg.samsung.com> To: Javier Martinez Canillas X-Mailer: Apple Mail (2.3124) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id u88H8w6d027049 > Am 08.09.2016 um 15:05 schrieb Javier Martinez Canillas : > > Allow the sub-device to be probed asynchronously so a bridge driver that's > waiting for the device can be notified and its .bound callback executed. > > Signed-off-by: Javier Martinez Canillas Tested-by: hns@goldelico.com > > --- > > drivers/media/i2c/ov9650.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/i2c/ov9650.c b/drivers/media/i2c/ov9650.c > index be5a7fd4f076..502c72238a4a 100644 > --- a/drivers/media/i2c/ov9650.c > +++ b/drivers/media/i2c/ov9650.c > @@ -23,6 +23,7 @@ > #include > > #include > +#include > #include > #include > #include > @@ -1520,6 +1521,10 @@ static int ov965x_probe(struct i2c_client *client, > /* Update exposure time min/max to match frame format */ > ov965x_update_exposure_ctrl(ov965x); > > + ret = v4l2_async_register_subdev(sd); > + if (ret < 0) > + goto err_ctrls; > + > return 0; > err_ctrls: > v4l2_ctrl_handler_free(sd->ctrl_handler); > @@ -1532,7 +1537,7 @@ static int ov965x_remove(struct i2c_client *client) > { > struct v4l2_subdev *sd = i2c_get_clientdata(client); > > - v4l2_device_unregister_subdev(sd); > + v4l2_async_unregister_subdev(sd); > v4l2_ctrl_handler_free(sd->ctrl_handler); > media_entity_cleanup(&sd->entity); > > -- > 2.7.4 >