From patchwork Mon Sep 30 19:02:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Mack X-Patchwork-Id: 2966611 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 A82579F288 for ; Mon, 30 Sep 2013 19:02:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 95368201D5 for ; Mon, 30 Sep 2013 19:02:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8B0DA2012D for ; Mon, 30 Sep 2013 19:02:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755957Ab3I3TCY (ORCPT ); Mon, 30 Sep 2013 15:02:24 -0400 Received: from svenfoo.org ([82.94.215.22]:49778 "EHLO mail.zonque.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755854Ab3I3TCV (ORCPT ); Mon, 30 Sep 2013 15:02:21 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.zonque.de (Postfix) with ESMTP id 5F927C173E; Mon, 30 Sep 2013 21:02:16 +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 YQLOSaNZLFxM; Mon, 30 Sep 2013 21:02:16 +0200 (CEST) Received: from tamtam.fritz.box (p5DDC5E21.dip0.t-ipconnect.de [93.220.94.33]) (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 59B62C1732; Mon, 30 Sep 2013 21:02:15 +0200 (CEST) From: Daniel Mack To: linux-usb@vger.kernel.org Cc: linux-omap@vger.kernel.org, neumann@teufel.de, bigeasy@linutronix.de, balbi@ti.com, Daniel Mack Subject: [PATCH v2 RESEND 2/3] usb: musb: blackfin: use SIMPLE_DEV_PM_OPS Date: Mon, 30 Sep 2013 21:02:08 +0200 Message-Id: <1380567729-27868-2-git-send-email-zonque@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1380567729-27868-1-git-send-email-zonque@gmail.com> References: <1380567729-27868-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=-7.5 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 bfin_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/blackfin.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c index 72e2056..d9692f7 100644 --- a/drivers/usb/musb/blackfin.c +++ b/drivers/usb/musb/blackfin.c @@ -561,23 +561,16 @@ static int bfin_resume(struct device *dev) return 0; } - -static struct dev_pm_ops bfin_pm_ops = { - .suspend = bfin_suspend, - .resume = bfin_resume, -}; - -#define DEV_PM_OPS &bfin_pm_ops -#else -#define DEV_PM_OPS NULL #endif +static SIMPLE_DEV_PM_OPS(bfin_pm_ops, bfin_suspend, bfin_resume); + static struct platform_driver bfin_driver = { .probe = bfin_probe, .remove = __exit_p(bfin_remove), .driver = { .name = "musb-blackfin", - .pm = DEV_PM_OPS, + .pm = &bfin_pm_ops, }, };