aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@st.com>2012-02-23 04:33:53 -0500
committerJeff Garzik <jgarzik@redhat.com>2012-03-13 12:43:13 -0400
commit40679b3ce9d993e33e026f402cbfffb35d2c4e3c (patch)
tree779816302b60f3d71804a15cebbf2bd3a20d1237 /drivers/ata
parent9716387311c790de381214c03e7f1b72b91a8189 (diff)
ata/pata_arasan_cf: Add Hibernation support
This patch adds in Hibernation related callbacks. Also we don't really need to free DMA channel on suspend. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/pata_arasan_cf.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
index 048589fad2ca..fc2db2a89a6b 100644
--- a/drivers/ata/pata_arasan_cf.c
+++ b/drivers/ata/pata_arasan_cf.c
@@ -925,11 +925,10 @@ static int arasan_cf_suspend(struct device *dev)
925 struct ata_host *host = dev_get_drvdata(dev); 925 struct ata_host *host = dev_get_drvdata(dev);
926 struct arasan_cf_dev *acdev = host->ports[0]->private_data; 926 struct arasan_cf_dev *acdev = host->ports[0]->private_data;
927 927
928 if (acdev->dma_chan) { 928 if (acdev->dma_chan)
929 acdev->dma_chan->device->device_control(acdev->dma_chan, 929 acdev->dma_chan->device->device_control(acdev->dma_chan,
930 DMA_TERMINATE_ALL, 0); 930 DMA_TERMINATE_ALL, 0);
931 dma_release_channel(acdev->dma_chan); 931
932 }
933 cf_exit(acdev); 932 cf_exit(acdev);
934 return ata_host_suspend(host, PMSG_SUSPEND); 933 return ata_host_suspend(host, PMSG_SUSPEND);
935} 934}
@@ -945,10 +944,7 @@ static int arasan_cf_resume(struct device *dev)
945 return 0; 944 return 0;
946} 945}
947 946
948static const struct dev_pm_ops arasan_cf_pm_ops = { 947static SIMPLE_DEV_PM_OPS(arasan_cf_pm_ops, arasan_cf_suspend, arasan_cf_resume);
949 .suspend = arasan_cf_suspend,
950 .resume = arasan_cf_resume,
951};
952#endif 948#endif
953 949
954static struct platform_driver arasan_cf_driver = { 950static struct platform_driver arasan_cf_driver = {
@@ -958,7 +954,7 @@ static struct platform_driver arasan_cf_driver = {
958 .name = DRIVER_NAME, 954 .name = DRIVER_NAME,
959 .owner = THIS_MODULE, 955 .owner = THIS_MODULE,
960#ifdef CONFIG_PM 956#ifdef CONFIG_PM
961 .pm = &arasan_cf_pm_ops, 957 .pm = &arasan_cf_pm_ops,
962#endif 958#endif
963 }, 959 },
964}; 960};