From patchwork Tue Jan 20 21:09:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 5672311 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 3EDCDC058D for ; Tue, 20 Jan 2015 21:09:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6B32F204E1 for ; Tue, 20 Jan 2015 21:09:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 55905204E2 for ; Tue, 20 Jan 2015 21:09:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754152AbbATVJv (ORCPT ); Tue, 20 Jan 2015 16:09:51 -0500 Received: from mail-lb0-f171.google.com ([209.85.217.171]:33307 "EHLO mail-lb0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754060AbbATVJv (ORCPT ); Tue, 20 Jan 2015 16:09:51 -0500 Received: by mail-lb0-f171.google.com with SMTP id w7so35878259lbi.2 for ; Tue, 20 Jan 2015 13:09:49 -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=NiL2fzed1vmPfdkuZUTY+diCyilNw0g9QPgC4o2b/v8RK8+e2mn+NGZZAHY+Rz24RK VXf+pbzd+dIRzIV+z6sEsykF/+7DHJRTkQ6IJ0CsfMNw0A0VkanAHrOBym5rXXnutKn6 YaEs56HupBuLKxGf5G8HrZnVedcRYcFpGqERkepukKefrQnEfJryZUTK48zZydqgfqyO 2lZhLJskoSTBBDdIq/nliT1c/JGDAuWEFo34UaWUpPpxQfIW9bOZT9JaTTYbv5685qRE sXS+3qrH2wKgLc6UJfcSufTeoePbmxgFLQRYNGNSy7UzandVcVhkc9qkik3eCyk/SpQy pzeg== X-Gm-Message-State: ALoCoQmNyQVbBZoVqs7Z1OhaLPQfydfcs8KCxBT2Hk4cM8v6KZTOonQlDBivM+Rdnb3VNvsu5WfD X-Received: by 10.152.42.164 with SMTP id p4mr34207504lal.45.1421788189672; Tue, 20 Jan 2015 13:09:49 -0800 (PST) Received: from wasted.cogentembedded.com (ppp17-152.pppoe.mtu-net.ru. [81.195.17.152]) by mx.google.com with ESMTPSA id ji3sm4294793lbc.38.2015.01.20.13.09.47 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jan 2015 13:09:48 -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, mikhail.ulyanov@cogentembedded.com Subject: [PATCH v2 1/2] shdmac: use SET_RUNTIME_PM_OPS() Date: Wed, 21 Jan 2015 00:09:46 +0300 Message-ID: <9005734.b9UuUHqyUV@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=ham 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)