Thread (32 messages) 32 messages, 8 authors, 2017-09-21

Re: [PATCH v13 06/25] omap3isp: Use generic parser for parsing fwnode endpoints

From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Date: 2017-09-19 12:46:18
Also in: linux-media

Hi Sakari,

On Tuesday, 19 September 2017 15:43:26 EEST Sakari Ailus wrote:
On Tue, Sep 19, 2017 at 02:40:29PM +0300, Laurent Pinchart wrote:
quoted
quoted
@@ -2256,7 +2210,9 @@ static int isp_probe(struct platform_device *pdev)

 	if (ret)
 	
 		return ret;

-	ret = isp_fwnodes_parse(&pdev->dev, &isp->notifier);
+	ret = v4l2_async_notifier_parse_fwnode_endpoints(
+		&pdev->dev, &isp->notifier, sizeof(struct isp_async_subdev),
+		isp_fwnode_parse);

 	if (ret < 0)
The documentation in patch 05/25 states that v4l2_async_notifier_release()
should be called even if v4l2_async_notifier_parse_fwnode_endpoints()
fails. I don't think that's needed here, so you might want to update the
documentation (and possibly the implementation of the function).
It is. If parsing fails, async sub-devices may have been already set up.
This happens e.g. when the parsing fails after the first one has been
successfully set up already.
But for v4l2_async_notifier_parse_fwnode_endpoints() we could clean up 
internally when an error occurs. Otherwise you need to call 
v4l2_async_notifier_release() here.

-- 
Regards,

Laurent Pinchart
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help