From patchwork Fri Mar 16 10:19:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiraz Hashim X-Patchwork-Id: 147180 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3A333B6EEF for ; Fri, 16 Mar 2012 21:21:29 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032437Ab2CPKV1 (ORCPT ); Fri, 16 Mar 2012 06:21:27 -0400 Received: from eu1sys200aog110.obsmtp.com ([207.126.144.129]:38852 "EHLO eu1sys200aog110.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031028Ab2CPKV0 (ORCPT ); Fri, 16 Mar 2012 06:21:26 -0400 Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob110.postini.com ([207.126.147.11]) with SMTP ID DSNKT2MUCW608Pm/e55vnKWw4egwE6UXAwon@postini.com; Fri, 16 Mar 2012 10:21:25 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 9514C14F; Fri, 16 Mar 2012 10:12:29 +0000 (GMT) Received: from Webmail-ap.st.com (eapex1hubcas4.st.com [10.80.176.69]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id E222E1079; Fri, 16 Mar 2012 10:20:52 +0000 (GMT) Received: from localhost (10.199.82.228) by Webmail-ap.st.com (10.80.176.7) with Microsoft SMTP Server (TLS) id 8.3.192.1; Fri, 16 Mar 2012 18:20:11 +0800 From: Shiraz Hashim To: , Jeff Garzik Cc: , , Shiraz Hashim Subject: [PATCH resend] ata/ahci_platform: add hibernation callbacks Date: Fri, 16 Mar 2012 15:49:55 +0530 Message-ID: <1331893195-27078-1-git-send-email-shiraz.hashim@st.com> X-Mailer: git-send-email 1.7.9.rc0 MIME-Version: 1.0 Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Use existing suspend, resume implementation for hibernation callbacks. Signed-off-by: Shiraz Hashim --- drivers/ata/ahci_platform.c | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c index 2bbcbbe..4431c60 100644 --- a/drivers/ata/ahci_platform.c +++ b/drivers/ata/ahci_platform.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -286,13 +287,10 @@ static int ahci_resume(struct device *dev) return 0; } - -static struct dev_pm_ops ahci_pm_ops = { - .suspend = &ahci_suspend, - .resume = &ahci_resume, -}; #endif +SIMPLE_DEV_PM_OPS(ahci_pm_ops, ahci_suspend, ahci_resume); + static const struct of_device_id ahci_of_match[] = { { .compatible = "calxeda,hb-ahci", }, {}, @@ -305,9 +303,7 @@ static struct platform_driver ahci_driver = { .name = "ahci", .owner = THIS_MODULE, .of_match_table = ahci_of_match, -#ifdef CONFIG_PM .pm = &ahci_pm_ops, -#endif }, .id_table = ahci_devtype, };