From patchwork Sun Sep 22 14:43:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Mack X-Patchwork-Id: 2924401 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 9B6799F288 for ; Sun, 22 Sep 2013 14:43:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E046420529 for ; Sun, 22 Sep 2013 14:43:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1F74420503 for ; Sun, 22 Sep 2013 14:43:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752186Ab3IVOn2 (ORCPT ); Sun, 22 Sep 2013 10:43:28 -0400 Received: from svenfoo.org ([82.94.215.22]:58493 "EHLO mail.zonque.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751491Ab3IVOn2 (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 91B96C1705; Sun, 22 Sep 2013 16:43:25 +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 B4qsBUwdEWYR; Sun, 22 Sep 2013 16:43:25 +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 2DA16C1693; 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 2/4] usb: musb: blackfin: use SIMPLE_DEV_PM_OPS Date: Sun, 22 Sep 2013 16:43:17 +0200 Message-Id: <1379860999-7106-2-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 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, }, };