Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad92b5cf authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab
Browse files

[media] staging: v4l: omap4iss: Fix sub-device power management code



The same bug was present in the omap4iss driver as was in the omap3isp
driver. The code got copied to the omap4iss driver while broken. Fix the
omap4iss driver as well.

Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 54b5a749
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -533,14 +533,14 @@ static int iss_pipeline_link_notify(struct media_link *link, u32 flags,
	int ret;
	int ret;


	if (notification == MEDIA_DEV_NOTIFY_POST_LINK_CH &&
	if (notification == MEDIA_DEV_NOTIFY_POST_LINK_CH &&
	    !(link->flags & MEDIA_LNK_FL_ENABLED)) {
	    !(flags & MEDIA_LNK_FL_ENABLED)) {
		/* Powering off entities is assumed to never fail. */
		/* Powering off entities is assumed to never fail. */
		iss_pipeline_pm_power(source, -sink_use);
		iss_pipeline_pm_power(source, -sink_use);
		iss_pipeline_pm_power(sink, -source_use);
		iss_pipeline_pm_power(sink, -source_use);
		return 0;
		return 0;
	}
	}


	if (notification == MEDIA_DEV_NOTIFY_POST_LINK_CH &&
	if (notification == MEDIA_DEV_NOTIFY_PRE_LINK_CH &&
	    (flags & MEDIA_LNK_FL_ENABLED)) {
	    (flags & MEDIA_LNK_FL_ENABLED)) {
		ret = iss_pipeline_pm_power(source, sink_use);
		ret = iss_pipeline_pm_power(source, sink_use);
		if (ret < 0)
		if (ret < 0)