[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1466029790-31094-3-git-send-email-jmkrzyszt@gmail.com>
Date: Thu, 16 Jun 2016 00:29:49 +0200
From: Janusz Krzysztofik <jmkrzyszt@...il.com>
To: Mauro Carvalho Chehab <mchehab@....samsung.com>,
Guennadi Liakhovetski <g.liakhovetski@....de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Hans Verkuil <hverkuil@...all.nl>,
Amitoj Kaur Chawla <amitoj1606@...il.com>,
Arnd Bergmann <arnd@...db.de>,
Lee Jones <lee.jones@...aro.org>, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org,
Janusz Krzysztofik <jmkrzyszt@...il.com>
Subject: [PATCH 2/3] staging: media: omap1: fix sensor probe not working anymore
After clock_start() removal from from soc_camera_probe() (commit
9aea470b39 '[media] soc-camera: switch I2C subdevice drivers to use
v4l2-clk', introduced in v3.11), it occurred omap1_camera's sensor
can't be probed successfully without its clock being turned on in
advance. Fix that by surrounding soc_camera_host_register() invocation
with clock_start() / clock_stop().
Created and tested on Amstrad Delta against Linux-4.7-rc3 with
'staging: media: omap1: fix null pointer dereference in
omap1_cam_probe()' applied.
Signed-off-by: Janusz Krzysztofik <jmkrzyszt@...il.com>
---
drivers/staging/media/omap1/omap1_camera.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/media/omap1/omap1_camera.c b/drivers/staging/media/omap1/omap1_camera.c
index dc35d30..9b6140a 100644
--- a/drivers/staging/media/omap1/omap1_camera.c
+++ b/drivers/staging/media/omap1/omap1_camera.c
@@ -1650,7 +1650,11 @@ static int omap1_cam_probe(struct platform_device *pdev)
pcdev->soc_host.v4l2_dev.dev = &pdev->dev;
pcdev->soc_host.nr = pdev->id;
- err = soc_camera_host_register(&pcdev->soc_host);
+ err = omap1_cam_clock_start(&pcdev->soc_host);
+ if (!err) {
+ err = soc_camera_host_register(&pcdev->soc_host);
+ omap1_cam_clock_stop(&pcdev->soc_host);
+ }
if (err)
return err;
--
2.7.3
Powered by blists - more mailing lists