From patchwork Mon Jan 19 23:07:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 5661441 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@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 14623C058E for ; Mon, 19 Jan 2015 23:07:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 502802035B for ; Mon, 19 Jan 2015 23:07:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 74CC620394 for ; Mon, 19 Jan 2015 23:07:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751896AbbASXHN (ORCPT ); Mon, 19 Jan 2015 18:07:13 -0500 Received: from mail-la0-f46.google.com ([209.85.215.46]:44963 "EHLO mail-la0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751897AbbASXHM (ORCPT ); Mon, 19 Jan 2015 18:07:12 -0500 Received: by mail-la0-f46.google.com with SMTP id s18so10464218lam.5 for ; Mon, 19 Jan 2015 15:07:11 -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:organization :user-agent:mime-version:content-transfer-encoding:content-type; bh=7EyJL9ZpcH9dau5yTcO2ca17O517njHgxZNHfbCvg6Y=; b=E3RE+MEOgViahCvYVivoIld6KRyr2zrJrB+PUzUZcgFt/mTnxWppqlizFtfWyCJCsD 0GB52Gsvfa3VjFJd7cJF1hZNgozUZkAY1tD/8WBHciIIaZScxf2iqvhQBAXUwnWHNuc5 b+24MyldFVcLqN+vPf8kHg+ya0BrBqkbX2Y+Ash9QhxJqrYYnHdhxobmI1IErKD9x0FQ r1L+Gvni3lmunMAoOsx3eHuyYwyupV7KAzVQlBgJTuq67oIBIx1A5f3GtYuLCWIIDIrI pIejuITo4rL0BvbHIRf3xrYfjUstJFHmxLSENhIISlFV5h7HEUVz7g+TJUgHvgXlDrOB 4iiw== X-Gm-Message-State: ALoCoQk7hKjTp4jzVznZPHP/XNY1Kz/PV1DE4w8omTDoIzM0tR3EIHBYgWevRVjhpWSgyb1IpMyc X-Received: by 10.152.1.2 with SMTP id 2mr28316827lai.89.1421708830893; Mon, 19 Jan 2015 15:07:10 -0800 (PST) Received: from wasted.cogentembedded.com (ppp30-86.pppoe.mtu-net.ru. [81.195.30.86]) by mx.google.com with ESMTPSA id kt7sm4048712lac.4.2015.01.19.15.07.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Jan 2015 15:07:10 -0800 (PST) From: Sergei Shtylyov To: vinod.koul@intel.com, dan.j.williams@intel.com, dmaengine@vger.kernel.org Cc: linux-sh@vger.kernel.org Subject: [PATCH 1/2] shdmac: use SET_RUNTIME_PM_OPS() Date: Tue, 20 Jan 2015 02:07:08 +0300 Message-ID: <5989517.sdHCdG66dc@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.14.3 (Linux/3.17.8-200.fc20.x86_64; KDE/4.14.3; x86_64; ; ) MIME-Version: 1.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@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 Use SET_RUNTIME_PM_OPS() to initialize the runtime PM method pointers in the 'struct dev_pm_ops'; since that macro doesn't do anything if CONFIG_PM is not defined, we have to move #ifdef up to also cover the runtime PM methods in order to avoid compilation warnings. Based on orignal patch by Mikhail Ulyanov . Signed-off-by: Sergei Shtylyov --- The patch is against the 'next' branch of Vinod Koul's 'slave-dma.git' repo. drivers/dma/sh/shdmac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: slave-dma/drivers/dma/sh/shdmac.c =================================================================== --- slave-dma.orig/drivers/dma/sh/shdmac.c +++ slave-dma/drivers/dma/sh/shdmac.c @@ -588,6 +588,7 @@ static void sh_dmae_shutdown(struct plat sh_dmae_ctl_stop(shdev); } +#ifdef CONFIG_PM static int sh_dmae_runtime_suspend(struct device *dev) { return 0; @@ -600,7 +601,6 @@ static int sh_dmae_runtime_resume(struct return sh_dmae_rst(shdev); } -#ifdef CONFIG_PM static int sh_dmae_suspend(struct device *dev) { return 0; @@ -640,8 +640,8 @@ static int sh_dmae_resume(struct device static const struct dev_pm_ops sh_dmae_pm = { .suspend = sh_dmae_suspend, .resume = sh_dmae_resume, - .runtime_suspend = sh_dmae_runtime_suspend, - .runtime_resume = sh_dmae_runtime_resume, + SET_RUNTIME_PM_OPS(sh_dmae_runtime_suspend, sh_dmae_runtime_resume, + NULL) }; static dma_addr_t sh_dmae_slave_addr(struct shdma_chan *schan)