From patchwork Fri May 23 08:30:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Fenkart X-Patchwork-Id: 4228891 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7DE8BBF90B for ; Fri, 23 May 2014 08:31:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B43322017D for ; Fri, 23 May 2014 08:31:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C0935202DD for ; Fri, 23 May 2014 08:31:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751547AbaEWIbT (ORCPT ); Fri, 23 May 2014 04:31:19 -0400 Received: from mail-vc0-f178.google.com ([209.85.220.178]:35381 "EHLO mail-vc0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751325AbaEWIbO (ORCPT ); Fri, 23 May 2014 04:31:14 -0400 Received: by mail-vc0-f178.google.com with SMTP id ij19so2441860vcb.23 for ; Fri, 23 May 2014 01:31:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jW+Ecbp9sotPUhORotvaMPLnVcg3gK8j94KUO9hV8Fk=; b=NtXfw4yqwXTY078h+8izjb7HyGbwvVXn58uewHSqWigAu74tkxdfRVho1RNt4BZZ9R 3LhUtULUKD5LONLkvWcUJ+l9lk+ClbWY2lDg9qAm0GjE9oodpOyM3mMsSPeivz0hFxZe sUPMAkj+L2U1EQ+FAT7sqtuOsd1OQKfFaCL426dukSSxK3rp+nJgN9KT0V6ZvQyBtY+F 7xKUNgfLd4imTd9ZOIQo46fw3Kt863CiV3cPtPX6mW168BMMK0fdfml3IA52MdLd8kZP CUlpkFCpn6Zm9umxKR5vf5KNyhTSvEPF43k2PbRcyf54K8vxdaWEg7T8AnVWnyttDgWA 0otg== X-Received: by 10.220.12.66 with SMTP id w2mr2889405vcw.15.1400833873802; Fri, 23 May 2014 01:31:13 -0700 (PDT) Received: from localhost (ip-89-176-190-91.net.upcbroadband.cz. [89.176.190.91]) by mx.google.com with ESMTPSA id sy5sm4090892vdb.26.2014.05.23.01.31.11 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 23 May 2014 01:31:13 -0700 (PDT) From: Andreas Fenkart To: Tony Lindgren Cc: Chris Ball , Grant Likely , Felipe Balbi , Balaji T K , Andreas Mueller , Sebastian Reichel , zonque@gmail.com, galak@codeaurora.org, linux-doc@vger.kernel.org, linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org, Andreas Fenkart Subject: [PATCH v13 1/7] mmc: omap_hsmmc: install dummy pm runtime hooks if !CONFIG_PM_RUNTIME Date: Fri, 23 May 2014 10:30:28 +0200 Message-Id: <1400833834-15893-2-git-send-email-afenkart@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1400833834-15893-1-git-send-email-afenkart@gmail.com> References: <1400833834-15893-1-git-send-email-afenkart@gmail.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Signed-off-by: Andreas Fenkart diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 272e0ee..c62d9dd 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -199,7 +199,9 @@ struct omap_hsmmc_host { struct dma_chan *rx_chan; int slot_id; int response_busy; +#ifdef CONFIG_PM int context_loss; +#endif int protect_card; int reqs_blocked; int use_reg; @@ -712,14 +714,8 @@ static void omap_hsmmc_context_save(struct omap_hsmmc_host *host) #else -static int omap_hsmmc_context_restore(struct omap_hsmmc_host *host) -{ - return 0; -} - -static void omap_hsmmc_context_save(struct omap_hsmmc_host *host) -{ -} +#define omap_hsmmc_context_restore(host) +#define omap_hsmmc_context_save(host) #endif @@ -1700,11 +1696,14 @@ static int omap_hsmmc_regs_show(struct seq_file *s, void *data) struct mmc_host *mmc = s->private; struct omap_hsmmc_host *host = mmc_priv(mmc); - seq_printf(s, "mmc%d:\n ctx_loss:\t%d\n\nregs:\n", - mmc->index, host->context_loss); + seq_printf(s, "mmc%d:\n", mmc->index); - pm_runtime_get_sync(host->dev); +#ifdef CONFIG_PM + seq_printf(s, "ctx_loss:\t%d\n", host->context_loss); +#endif + pm_runtime_get_sync(host->dev); + seq_puts(s, "\nregs:\n"); seq_printf(s, "CON:\t\t0x%08x\n", OMAP_HSMMC_READ(host->base, CON)); seq_printf(s, "HCTL:\t\t0x%08x\n", @@ -2243,6 +2242,7 @@ static int omap_hsmmc_resume(struct device *dev) #define omap_hsmmc_resume NULL #endif +#ifdef CONFIG_PM_RUNTIME static int omap_hsmmc_runtime_suspend(struct device *dev) { struct omap_hsmmc_host *host; @@ -2264,6 +2264,10 @@ static int omap_hsmmc_runtime_resume(struct device *dev) return 0; } +#else +#define omap_hsmmc_runtime_suspend NULL +#define omap_hsmmc_runtime_resume NULL +#endif static struct dev_pm_ops omap_hsmmc_dev_pm_ops = { .suspend = omap_hsmmc_suspend,