]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/ata/pata_arasan_cf.c
Merge branch 'drm-intel-next-fixes' into drm-intel-fixes
[karo-tx-linux.git] / drivers / ata / pata_arasan_cf.c
index 719bb73a73e046215d6005e01df46d1d9baefad9..048589fad2ca203ef529e7897a2d9d0e2bc858d5 100644 (file)
@@ -922,8 +922,7 @@ static int __devexit arasan_cf_remove(struct platform_device *pdev)
 #ifdef CONFIG_PM
 static int arasan_cf_suspend(struct device *dev)
 {
-       struct platform_device *pdev = to_platform_device(dev);
-       struct ata_host *host = dev_get_drvdata(&pdev->dev);
+       struct ata_host *host = dev_get_drvdata(dev);
        struct arasan_cf_dev *acdev = host->ports[0]->private_data;
 
        if (acdev->dma_chan) {
@@ -937,8 +936,7 @@ static int arasan_cf_suspend(struct device *dev)
 
 static int arasan_cf_resume(struct device *dev)
 {
-       struct platform_device *pdev = to_platform_device(dev);
-       struct ata_host *host = dev_get_drvdata(&pdev->dev);
+       struct ata_host *host = dev_get_drvdata(dev);
        struct arasan_cf_dev *acdev = host->ports[0]->private_data;
 
        cf_init(acdev);
@@ -965,17 +963,7 @@ static struct platform_driver arasan_cf_driver = {
        },
 };
 
-static int __init arasan_cf_init(void)
-{
-       return platform_driver_register(&arasan_cf_driver);
-}
-module_init(arasan_cf_init);
-
-static void __exit arasan_cf_exit(void)
-{
-       platform_driver_unregister(&arasan_cf_driver);
-}
-module_exit(arasan_cf_exit);
+module_platform_driver(arasan_cf_driver);
 
 MODULE_AUTHOR("Viresh Kumar <viresh.kumar@st.com>");
 MODULE_DESCRIPTION("Arasan ATA Compact Flash driver");