From patchwork Mon Apr 29 08:56:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 2498841 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id C2DA5DF25A for ; Mon, 29 Apr 2013 08:56:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751206Ab3D2I4U (ORCPT ); Mon, 29 Apr 2013 04:56:20 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:16872 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750828Ab3D2I4T (ORCPT ); Mon, 29 Apr 2013 04:56:19 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MM000K8AE5AHUT0@mailout2.samsung.com> for linux-mmc@vger.kernel.org; Mon, 29 Apr 2013 17:56:17 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.47]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 39.14.31024.1B53E715; Mon, 29 Apr 2013 17:56:17 +0900 (KST) X-AuditID: cbfee68d-b7f016d000007930-54-517e35b1d8ec Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 70.E3.01422.1B53E715; Mon, 29 Apr 2013 17:56:17 +0900 (KST) Received: from DOJG1HAN03 ([12.23.120.99]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MM000I8LE5TEB70@mmp2.samsung.com>; Mon, 29 Apr 2013 17:56:17 +0900 (KST) From: Jingoo Han To: 'Chris Ball' Cc: linux-mmc@vger.kernel.org, 'Ludovic Desroches' , 'Jingoo Han' Subject: [PATCH V2] mmc: atmel-mci: add CONFIG_PM_SLEEP to suspend/resume functions Date: Mon, 29 Apr 2013 17:56:16 +0900 Message-id: <000101ce44b7$68f391a0$3adab4e0$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: Ac5Et1m8wLO/FR04SQy2rC+ul8FydQ== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrMIsWRmVeSWpSXmKPExsVy+t8zfd2NpnWBBq8WClpsf72RzeLywkus Fkf+9zNaHJqZ7MDiseDXVhaPQ1fWMnr0bVnF6PF5k1wASxSXTUpqTmZZapG+XQJXxpRNHgU3 eCve7LnH2MC4i7uLkZNDQsBE4t+TGWwQtpjEhXvrgWwuDiGBZYwSZz+3MsEU3f7fBmYLCUxn lNjzAsr+xShx/0oqiM0moCbx5cthdhBbREBRYsv342A2s0CFxM4DR5lBbGGBUInpE2azgNgs AqoSHb+OgC3mFbCU+H97LxOELSjxY/I9FoheLYn1O48zQdjyEpvXvGWGuEdBYsfZ14wQu/Qk nj5bwAZRIyKx78U7RpAHJARWsUs8/nmbCWKZgMS3yYeAhnIAJWQlNh2AmiMpcXDFDZYJjGKz kKyehWT1LCSrZyFZsYCRZRWjaGpBckFxUnqRoV5xYm5xaV66XnJ+7iZGSIT17mC8fcD6EGMy 0PqJzFKiyfnACM0riTc0NjOyMDUxNTYytzQjTVhJnFetxTpQSCA9sSQ1OzW1ILUovqg0J7X4 ECMTB6dUA+PqiJsdRQzhO9UC3hQZ1PC9ky5e+PBhbq/TMwaxN5Z73lu+N/372vRG5q/Uuek3 mxz1HrbbZAVyBv+eucHM/+NPpVfPirsVn/oe61p3OffKPWe+osm1lgtTE3dEbby28YNH9+eC +qhDPxr/dprop7gv/zttyrLv6yYETLPrDagICLS7KJ54hlOJpTgj0VCLuag4EQBfX/9SxgIA AA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprAKsWRmVeSWpSXmKPExsVy+t9jQd2NpnWBBovm8Vpsf72RzeLywkus Fkf+9zNaHJqZ7MDiseDXVhaPQ1fWMnr0bVnF6PF5k1wAS1QDo01GamJKapFCal5yfkpmXrqt kndwvHO8qZmBoa6hpYW5kkJeYm6qrZKLT4CuW2YO0EolhbLEnFKgUEBicbGSvh2mCaEhbroW MI0Rur4hQXA9RgZoIGEdY8aUTR4FN3gr3uy5x9jAuIu7i5GTQ0LAROL2/zYmCFtM4sK99Wwg tpDAdEaJPS+YIOxfjBL3r6SC2GwCahJfvhxmB7FFBBQltnw/DmYzC1RI7DxwlBnEFhYIlZg+ YTYLiM0ioCrR8esI2ExeAUuJ/7f3MkHYghI/Jt9jgejVkli/8zgThC0vsXnNW2aIexQkdpx9 zQixS0/i6bMFbBA1IhL7XrxjnMAoMAvJqFlIRs1CMmoWkpYFjCyrGEVTC5ILipPSc430ihNz i0vz0vWS83M3MYLj95n0DsZVDRaHGAU4GJV4eAM21wYKsSaWFVfmHmKU4GBWEuFVNKoLFOJN SaysSi3Kjy8qzUktPsSYDPTpRGYp0eR8YGrJK4k3NDYxM7I0MrMwMjE3J01YSZz3YKt1oJBA emJJanZqakFqEcwWJg5OqQZGBybhcwFbXfZteL3hLYeGhoH+uRXnRJ8fWlPOlO0bq73sB9ue 6RvC//hLzDKROSft9tv3iOyyiRM++fQdPVq6QOLEwalmv2KahBcLVJvIveJjcyzbo1n1y8Z6 Up7w+ofHypPK7f91B82dlKV5ZkrSyb5Vszb/72p3jBDc3z1tnfBNOYHbdxw+K7EUZyQaajEX FScCABIu09gjAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following build warning when CONFIG_PM_SLEEP is not selected. This is because sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when the CONFIG_PM_SLEEP is enabled. drivers/mmc/host/atmel-mci.c:2509:12: warning: 'atmci_suspend' defined but not used [-Wunused-function] drivers/mmc/host/atmel-mci.c:2539:12: warning: 'atmci_resume' defined but not used [-Wunused-function] Acked-by: Ludovic Desroches Signed-off-by: Jingoo Han --- Changes since v1: - added Ludovic Desroches's Acked-by - re-based on the latest branch drivers/mmc/host/atmel-mci.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index e75774f..645fe9a 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -2505,7 +2505,7 @@ static int __exit atmci_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int atmci_suspend(struct device *dev) { struct atmel_mci *host = dev_get_drvdata(dev); @@ -2560,17 +2560,15 @@ static int atmci_resume(struct device *dev) return ret; } -static SIMPLE_DEV_PM_OPS(atmci_pm, atmci_suspend, atmci_resume); -#define ATMCI_PM_OPS (&atmci_pm) -#else -#define ATMCI_PM_OPS NULL #endif +static SIMPLE_DEV_PM_OPS(atmci_pm, atmci_suspend, atmci_resume); + static struct platform_driver atmci_driver = { .remove = __exit_p(atmci_remove), .driver = { .name = "atmel_mci", - .pm = ATMCI_PM_OPS, + .pm = &atmci_pm, .of_match_table = of_match_ptr(atmci_dt_ids), }, };