From patchwork Mon Jan 19 13:22:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 43311 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C64B92410B for ; Mon, 19 Jan 2015 13:23:39 +0000 (UTC) Received: by mail-lb0-f199.google.com with SMTP id f15sf3037886lbj.2 for ; Mon, 19 Jan 2015 05:23:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=0GCqwd5gJF4bUtgCgauo6q6eOL0t98JfPcEAl8fKW98=; b=Y2YaMIGUmGtUMPSgCadFHZx5xvHsMaWXMwJpIi53ZdF++KOxGaQLzfWhdHyC+LLxuA rbQ36DSsIwDNnCC0vvjKCN120aiJ5T0UP/3MIChAQ/of7BBoydMnqba/cGmSPAPjSdDW rKqcviBJb6e5s5scwFJcsNpZuq6OYwMxWJUSBDtB2mn+KlpiSvfOKRAu5TFN3UEtM29q XcUR99SfWVMJGNJykds/Tbnhjms2VEDX+9qwTxJHjXvlE3i8w8tFXpC7KreKftO0zi7w +ASVEI5rF+D6YsUAT0XI/RBFMHjkKN7AoZHsnjS3AOkZouP7KVkrsQYE/7oLPXzMlvYi /7fw== X-Gm-Message-State: ALoCoQkLpnhAEimYS6gMaOXpipizY6N+UFYX2lHruE5VglW0x2s0krK4OQFYCz3tzGf/u1QFd+Vt X-Received: by 10.180.208.46 with SMTP id mb14mr2060853wic.4.1421673818407; Mon, 19 Jan 2015 05:23:38 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.161.198 with SMTP id xu6ls539747lab.86.gmail; Mon, 19 Jan 2015 05:23:38 -0800 (PST) X-Received: by 10.152.5.67 with SMTP id q3mr30775352laq.73.1421673818090; Mon, 19 Jan 2015 05:23:38 -0800 (PST) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id ld9si11535683lbc.77.2015.01.19.05.23.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 19 Jan 2015 05:23:34 -0800 (PST) Received-SPF: temperror (google.com: error in processing during lookup of patch+caf_=patchwork-forward=linaro.org@linaro.org: DNS timeout) client-ip=209.85.215.46; Received: by mail-la0-f46.google.com with SMTP id s18so7854556lam.5 for ; Mon, 19 Jan 2015 05:23:34 -0800 (PST) X-Received: by 10.112.44.230 with SMTP id h6mr3280855lbm.98.1421673814002; Mon, 19 Jan 2015 05:23:34 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp1089876lbb; Mon, 19 Jan 2015 05:23:33 -0800 (PST) X-Received: by 10.70.41.177 with SMTP id g17mr16143085pdl.103.1421673799216; Mon, 19 Jan 2015 05:23:19 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ot4si607014pab.22.2015.01.19.05.23.18; Mon, 19 Jan 2015 05:23:19 -0800 (PST) Received-SPF: none (google.com: linux-media-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752085AbbASNXR (ORCPT + 3 others); Mon, 19 Jan 2015 08:23:17 -0500 Received: from mail-la0-f51.google.com ([209.85.215.51]:60023 "EHLO mail-la0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751562AbbASNXQ (ORCPT ); Mon, 19 Jan 2015 08:23:16 -0500 Received: by mail-la0-f51.google.com with SMTP id ge10so7748536lab.10 for ; Mon, 19 Jan 2015 05:23:14 -0800 (PST) X-Received: by 10.152.5.198 with SMTP id u6mr31484382lau.42.1421673792625; Mon, 19 Jan 2015 05:23:12 -0800 (PST) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id v4sm3080344lbz.12.2015.01.19.05.23.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 19 Jan 2015 05:23:11 -0800 (PST) From: Ulf Hansson To: Mauro Carvalho Chehab , linux-media@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Kukjin Kim , Sylwester Nawrocki , Kyungmin Park , Ulf Hansson Subject: [PATCH V2 8/8] [media] exynos-gsc: Simplify system PM Date: Mon, 19 Jan 2015 14:22:40 +0100 Message-Id: <1421673760-2600-9-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1421673760-2600-1-git-send-email-ulf.hansson@linaro.org> References: <1421673760-2600-1-git-send-email-ulf.hansson@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=temperror (google.com: error in processing during lookup of patch+caf_=patchwork-forward=linaro.org@linaro.org: DNS timeout) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , It's not needed to keep a local flag about the current system PM state. Let's just remove that code and the corresponding debug print. Signed-off-by: Ulf Hansson --- drivers/media/platform/exynos-gsc/gsc-core.c | 21 --------------------- drivers/media/platform/exynos-gsc/gsc-core.h | 3 --- 2 files changed, 24 deletions(-) diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c index 194f9fc..71b227c 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/exynos-gsc/gsc-core.c @@ -1191,20 +1191,6 @@ static int gsc_runtime_suspend(struct device *dev) #ifdef CONFIG_PM_SLEEP static int gsc_resume(struct device *dev) { - struct gsc_dev *gsc = dev_get_drvdata(dev); - unsigned long flags; - - pr_debug("gsc%d: state: 0x%lx", gsc->id, gsc->state); - - /* Do not resume if the device was idle before system suspend */ - spin_lock_irqsave(&gsc->slock, flags); - if (!test_and_clear_bit(ST_SUSPEND, &gsc->state) || - !gsc_m2m_opened(gsc)) { - spin_unlock_irqrestore(&gsc->slock, flags); - return 0; - } - spin_unlock_irqrestore(&gsc->slock, flags); - if (!pm_runtime_suspended(dev)) return gsc_runtime_resume(dev); @@ -1213,13 +1199,6 @@ static int gsc_resume(struct device *dev) static int gsc_suspend(struct device *dev) { - struct gsc_dev *gsc = dev_get_drvdata(dev); - - pr_debug("gsc%d: state: 0x%lx", gsc->id, gsc->state); - - if (test_and_set_bit(ST_SUSPEND, &gsc->state)) - return 0; - if (!pm_runtime_suspended(dev)) return gsc_runtime_suspend(dev); diff --git a/drivers/media/platform/exynos-gsc/gsc-core.h b/drivers/media/platform/exynos-gsc/gsc-core.h index fa572aa..2f62271 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.h +++ b/drivers/media/platform/exynos-gsc/gsc-core.h @@ -48,9 +48,6 @@ #define GSC_CTX_ABORT (1 << 7) enum gsc_dev_flags { - /* for global */ - ST_SUSPEND, - /* for m2m node */ ST_M2M_OPEN, ST_M2M_RUN,