From patchwork Sun Sep 22 14:43:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Mack X-Patchwork-Id: 2924381 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id ABDE79F288 for ; Sun, 22 Sep 2013 14:43:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EA11B20527 for ; Sun, 22 Sep 2013 14:43:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1D1E920503 for ; Sun, 22 Sep 2013 14:43:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752197Ab3IVOn3 (ORCPT ); Sun, 22 Sep 2013 10:43:29 -0400 Received: from svenfoo.org ([82.94.215.22]:58501 "EHLO mail.zonque.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751664Ab3IVOn2 (ORCPT ); Sun, 22 Sep 2013 10:43:28 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.zonque.de (Postfix) with ESMTP id 3AC54C1712; Sun, 22 Sep 2013 16:43:26 +0200 (CEST) Received: from mail.zonque.de ([127.0.0.1]) by localhost (rambrand.bugwerft.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ytAlY6chXQEN; Sun, 22 Sep 2013 16:43:26 +0200 (CEST) Received: from tamtam.fritz.box (p5DDC784F.dip0.t-ipconnect.de [93.220.120.79]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.zonque.de (Postfix) with ESMTPSA id 906F0C15FF; Sun, 22 Sep 2013 16:43:25 +0200 (CEST) From: Daniel Mack To: linux-usb@vger.kernel.org Cc: balbi@ti.com, linux-omap@vger.kernel.org, gregkh@linuxfoundation.org, Daniel Mack Subject: [PATCH v2 3/4] usb: musb: omap2430: use SIMPLE_DEV_PM_OPS Date: Sun, 22 Sep 2013 16:43:18 +0200 Message-Id: <1379860999-7106-3-git-send-email-zonque@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1379860999-7106-1-git-send-email-zonque@gmail.com> References: <1379860999-7106-1-git-send-email-zonque@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI,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 This makes omap2430_pm_ops const and will stub the struct out in case CONFIG_PM_SLEEP is not set. Signed-off-by: Daniel Mack --- drivers/usb/musb/omap2430.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 59d2245..be42460 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -659,17 +659,12 @@ static int omap2430_runtime_resume(struct device *dev) return 0; } - -static struct dev_pm_ops omap2430_pm_ops = { - .runtime_suspend = omap2430_runtime_suspend, - .runtime_resume = omap2430_runtime_resume, -}; - -#define DEV_PM_OPS (&omap2430_pm_ops) -#else -#define DEV_PM_OPS NULL #endif +static SIMPLE_DEV_PM_OPS(omap2430_pm_ops, + omap2430_runtime_suspend, + omap2430_runtime_resume); + #ifdef CONFIG_OF static const struct of_device_id omap2430_id_table[] = { { @@ -688,7 +683,7 @@ static struct platform_driver omap2430_driver = { .remove = omap2430_remove, .driver = { .name = "musb-omap2430", - .pm = DEV_PM_OPS, + .pm = &omap2430_pm_ops, .of_match_table = of_match_ptr(omap2430_id_table), }, };