Return-Path: Received: from mail-by2nam03on0115.outbound.protection.outlook.com ([104.47.42.115]:54496 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933819AbeCCWc0 (ORCPT ); Sat, 3 Mar 2018 17:32:26 -0500 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Janusz Krzysztofik , Guennadi Liakhovetski , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 057/219] [media] media: i2c/soc_camera: fix ov6650 sensor getting wrong clock Date: Sat, 3 Mar 2018 22:28:29 +0000 Message-ID: <20180303222716.26640-57-alexander.levin@microsoft.com> References: <20180303222716.26640-1-alexander.levin@microsoft.com> In-Reply-To: <20180303222716.26640-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Janusz Krzysztofik [ Upstream commit 54449af0e0b2ea43a8166611c95b730c850c3184 ] After changes to v4l2_clk API introduced in v4.1 by commits a37462b919 '[media] V4L: remove clock name from v4l2_clk API' and 4f528afcfb '[media] V4L: add CCF support to the v4l2_clk API', ov6650 sensor stopped responding because v4l2_clk_get(), still called with depreciated V4L2 clock name "mclk", started to return respective CCF clock instead of the V4l2 one registered by soc_camera. Fix it by calling v4l2_clk_get() with NULL clock name. Created and tested on Amstrad Delta against Linux-4.7-rc3 with omap1_camera fixes. Signed-off-by: Janusz Krzysztofik Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/i2c/soc_camera/ov6650.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/soc_camera/ov6650.c b/drivers/media/i2c/soc_= camera/ov6650.c index 4bf2995e1cb8..8f85910eda5d 100644 --- a/drivers/media/i2c/soc_camera/ov6650.c +++ b/drivers/media/i2c/soc_camera/ov6650.c @@ -1033,7 +1033,7 @@ static int ov6650_probe(struct i2c_client *client, priv->code =3D MEDIA_BUS_FMT_YUYV8_2X8; priv->colorspace =3D V4L2_COLORSPACE_JPEG; =20 - priv->clk =3D v4l2_clk_get(&client->dev, "mclk"); + priv->clk =3D v4l2_clk_get(&client->dev, NULL); if (IS_ERR(priv->clk)) { ret =3D PTR_ERR(priv->clk); goto eclkget; --=20 2.14.1