From patchwork Mon Oct 26 23:01:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 7492441 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B71C09F36A for ; Mon, 26 Oct 2015 23:03:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DF5032085B for ; Mon, 26 Oct 2015 23:03:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5931420863 for ; Mon, 26 Oct 2015 23:03:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752234AbbJZXDy (ORCPT ); Mon, 26 Oct 2015 19:03:54 -0400 Received: from nblzone-211-213.nblnetworks.fi ([83.145.211.213]:45015 "EHLO hillosipuli.retiisi.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752093AbbJZXDw (ORCPT ); Mon, 26 Oct 2015 19:03:52 -0400 Received: from lanttu.localdomain (lanttu.localdomain [192.168.5.64]) by hillosipuli.retiisi.org.uk (Postfix) with ESMTP id 4D9E3600AB; Tue, 27 Oct 2015 01:03:46 +0200 (EET) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: laurent.pinchart@ideasonboard.com, javier@osg.samsung.com, mchehab@osg.samsung.com, hverkuil@xs4all.nl Subject: [PATCH 16/19] staging: omap4iss: Fix sub-device power management code Date: Tue, 27 Oct 2015 01:01:47 +0200 Message-Id: <1445900510-1398-17-git-send-email-sakari.ailus@iki.fi> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1445900510-1398-1-git-send-email-sakari.ailus@iki.fi> References: <1445900510-1398-1-git-send-email-sakari.ailus@iki.fi> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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: Sakari Ailus --- drivers/staging/media/omap4iss/iss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/omap4iss/iss.c b/drivers/staging/media/omap4iss/iss.c index 076ddd4..c097fd5 100644 --- a/drivers/staging/media/omap4iss/iss.c +++ b/drivers/staging/media/omap4iss/iss.c @@ -533,14 +533,14 @@ static int iss_pipeline_link_notify(struct media_link *link, u32 flags, int ret; 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. */ iss_pipeline_pm_power(source, -sink_use); iss_pipeline_pm_power(sink, -source_use); return 0; } - if (notification == MEDIA_DEV_NOTIFY_POST_LINK_CH && + if (notification == MEDIA_DEV_NOTIFY_PRE_LINK_CH && (flags & MEDIA_LNK_FL_ENABLED)) { ret = iss_pipeline_pm_power(source, sink_use); if (ret < 0)