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: 5658781 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C5003C058D for ; Mon, 19 Jan 2015 13:23:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F2A8920035 for ; Mon, 19 Jan 2015 13:23:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0C9A320382 for ; Mon, 19 Jan 2015 13:23:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751562AbbASNXS (ORCPT ); Mon, 19 Jan 2015 08:23:18 -0500 Received: from mail-la0-f53.google.com ([209.85.215.53]:44211 "EHLO mail-la0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752055AbbASNXR (ORCPT ); Mon, 19 Jan 2015 08:23:17 -0500 Received: by mail-la0-f53.google.com with SMTP id gq15so4347317lab.12 for ; Mon, 19 Jan 2015 05:23:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=tAEpg3UCmqRfliNUYeUEQDt/Dk9prUSysnCv9rzmHWI=; b=PsDX+QXJwyfmadRIYkobyMrpa7P9T14UazfJQDj9cniVqw9SSWxIvK5w9RJvzFUJrr pSA4qlCey50qXUB3X826CMCe2pHBP7e+kbYCwlUEba67CnxnjJV7WBSgC8p0wSXkAJSD QsceBA2LGCr6JnZimDWdWOwKr4hFlTzCZFHKUG3ZqKmZAJcOMM+qyPfBziW61Fwh/DYd 4h7T0plzgHwW60lqCUbif8/qhLY0Ugz6e30Zd1wosbfetpQYBiyOP/PSUIDdK89y19gx NxhxYuPP9w3dPiBUmftpgSyn/yj23/Gwt7YEbFP5+6jrhdzfnovqFWvuw/P3/1nevfCZ jtDA== X-Gm-Message-State: ALoCoQlpaXbqD9Mfi27D6pG7jzQb8tCZKQVHJmqjV1aPE4nIEFfEdVyb4il729bKH9HjwdW0+p96 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-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 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,