From patchwork Sun Mar 15 13:26:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 6012971 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@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 C8AE9BF90F for ; Sun, 15 Mar 2015 13:33:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C48FE202C8 for ; Sun, 15 Mar 2015 13:33:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7562E20274 for ; Sun, 15 Mar 2015 13:33:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752440AbbCONdT (ORCPT ); Sun, 15 Mar 2015 09:33:19 -0400 Received: from smtp-out-061.synserver.de ([212.40.185.61]:1035 "EHLO smtp-out-061.synserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752115AbbCONdS (ORCPT ); Sun, 15 Mar 2015 09:33:18 -0400 X-Greylist: delayed 399 seconds by postgrey-1.27 at vger.kernel.org; Sun, 15 Mar 2015 09:33:17 EDT Received: (qmail 27206 invoked by uid 0); 15 Mar 2015 13:26:13 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 27114 Received: from ppp-88-217-83-222.dynamic.mnet-online.de (HELO lars-adi-laptop.fritz.box) [88.217.83.222] by 217.119.54.96 with SMTP; 15 Mar 2015 13:26:12 -0000 From: Lars-Peter Clausen To: Kalle Valo Cc: Solomon Peachy , linux-wireless@vger.kernel.org, Lars-Peter Clausen Subject: [PATCH] wireless: cw1200: Fix suspend Date: Sun, 15 Mar 2015 14:26:20 +0100 Message-Id: <1426425980-21743-1-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 1.8.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@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 The cw1200 driver implements suspend and resume callbacks and assigns them to the suspend and resume fields of the device_driver struct. These callbacks are never actually called by anything though. Modify the driver to properly use dev_pm_ops so that the suspend function is actually executed upon suspend and drop the empty resume function. Signed-off-by: Lars-Peter Clausen --- drivers/net/wireless/cw1200/cw1200_spi.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/cw1200/cw1200_spi.c b/drivers/net/wireless/cw1200/cw1200_spi.c index 964b64a..7603546 100644 --- a/drivers/net/wireless/cw1200/cw1200_spi.c +++ b/drivers/net/wireless/cw1200/cw1200_spi.c @@ -447,7 +447,7 @@ static int cw1200_spi_disconnect(struct spi_device *func) } #ifdef CONFIG_PM -static int cw1200_spi_suspend(struct device *dev, pm_message_t state) +static int cw1200_spi_suspend(struct device *dev) { struct hwbus_priv *self = spi_get_drvdata(to_spi_device(dev)); @@ -458,10 +458,8 @@ static int cw1200_spi_suspend(struct device *dev, pm_message_t state) return 0; } -static int cw1200_spi_resume(struct device *dev) -{ - return 0; -} +static SIMPLE_DEV_PM_OPS(cw1200_pm_ops, cw1200_spi_suspend, NULL); + #endif static struct spi_driver spi_driver = { @@ -472,8 +470,7 @@ static struct spi_driver spi_driver = { .bus = &spi_bus_type, .owner = THIS_MODULE, #ifdef CONFIG_PM - .suspend = cw1200_spi_suspend, - .resume = cw1200_spi_resume, + .pm = &cw1200_pm_ops, #endif }, };