aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2014-08-12 12:22:27 -0400
committerTejun Heo <tj@kernel.org>2014-08-16 08:35:34 -0400
commit515d9b2c03943ca904cd135e1b1d9ddd168c1b27 (patch)
tree1fe2c33660eb07672849b48e47e50a4b42149ec4 /drivers/ata
parent88ec63d6f85ccf40988ddae8b430dcb07355b29b (diff)
ata: remove deprecated struct ahci_platform_data
The last user of the deprecated struct ahci_platform_data has been cleaned up recently (SPEAr1340 got a proper PHY driver). Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/ahci_platform.c18
-rw-r--r--drivers/ata/libahci_platform.c23
2 files changed, 1 insertions, 40 deletions
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index f61ddb9146d6..06f1d59fa678 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -32,7 +32,6 @@ static const struct ata_port_info ahci_port_info = {
32static int ahci_probe(struct platform_device *pdev) 32static int ahci_probe(struct platform_device *pdev)
33{ 33{
34 struct device *dev = &pdev->dev; 34 struct device *dev = &pdev->dev;
35 struct ahci_platform_data *pdata = dev_get_platdata(dev);
36 struct ahci_host_priv *hpriv; 35 struct ahci_host_priv *hpriv;
37 int rc; 36 int rc;
38 37
@@ -44,29 +43,14 @@ static int ahci_probe(struct platform_device *pdev)
44 if (rc) 43 if (rc)
45 return rc; 44 return rc;
46 45
47 /*
48 * Some platforms might need to prepare for mmio region access,
49 * which could be done in the following init call. So, the mmio
50 * region shouldn't be accessed before init (if provided) has
51 * returned successfully.
52 */
53 if (pdata && pdata->init) {
54 rc = pdata->init(dev, hpriv->mmio);
55 if (rc)
56 goto disable_resources;
57 }
58
59 if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci")) 46 if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci"))
60 hpriv->flags |= AHCI_HFLAG_NO_FBS | AHCI_HFLAG_NO_NCQ; 47 hpriv->flags |= AHCI_HFLAG_NO_FBS | AHCI_HFLAG_NO_NCQ;
61 48
62 rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info); 49 rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info);
63 if (rc) 50 if (rc)
64 goto pdata_exit; 51 goto disable_resources;
65 52
66 return 0; 53 return 0;
67pdata_exit:
68 if (pdata && pdata->exit)
69 pdata->exit(dev);
70disable_resources: 54disable_resources:
71 ahci_platform_disable_resources(hpriv); 55 ahci_platform_disable_resources(hpriv);
72 return rc; 56 return rc;
diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c
index 5b92c290e6c6..c0510de8a4c9 100644
--- a/drivers/ata/libahci_platform.c
+++ b/drivers/ata/libahci_platform.c
@@ -502,13 +502,8 @@ EXPORT_SYMBOL_GPL(ahci_platform_init_host);
502 502
503static void ahci_host_stop(struct ata_host *host) 503static void ahci_host_stop(struct ata_host *host)
504{ 504{
505 struct device *dev = host->dev;
506 struct ahci_platform_data *pdata = dev_get_platdata(dev);
507 struct ahci_host_priv *hpriv = host->private_data; 505 struct ahci_host_priv *hpriv = host->private_data;
508 506
509 if (pdata && pdata->exit)
510 pdata->exit(dev);
511
512 ahci_platform_disable_resources(hpriv); 507 ahci_platform_disable_resources(hpriv);
513} 508}
514 509
@@ -592,7 +587,6 @@ EXPORT_SYMBOL_GPL(ahci_platform_resume_host);
592 */ 587 */
593int ahci_platform_suspend(struct device *dev) 588int ahci_platform_suspend(struct device *dev)
594{ 589{
595 struct ahci_platform_data *pdata = dev_get_platdata(dev);
596 struct ata_host *host = dev_get_drvdata(dev); 590 struct ata_host *host = dev_get_drvdata(dev);
597 struct ahci_host_priv *hpriv = host->private_data; 591 struct ahci_host_priv *hpriv = host->private_data;
598 int rc; 592 int rc;
@@ -601,19 +595,9 @@ int ahci_platform_suspend(struct device *dev)
601 if (rc) 595 if (rc)
602 return rc; 596 return rc;
603 597
604 if (pdata && pdata->suspend) {
605 rc = pdata->suspend(dev);
606 if (rc)
607 goto resume_host;
608 }
609
610 ahci_platform_disable_resources(hpriv); 598 ahci_platform_disable_resources(hpriv);
611 599
612 return 0; 600 return 0;
613
614resume_host:
615 ahci_platform_resume_host(dev);
616 return rc;
617} 601}
618EXPORT_SYMBOL_GPL(ahci_platform_suspend); 602EXPORT_SYMBOL_GPL(ahci_platform_suspend);
619 603
@@ -629,7 +613,6 @@ EXPORT_SYMBOL_GPL(ahci_platform_suspend);
629 */ 613 */
630int ahci_platform_resume(struct device *dev) 614int ahci_platform_resume(struct device *dev)
631{ 615{
632 struct ahci_platform_data *pdata = dev_get_platdata(dev);
633 struct ata_host *host = dev_get_drvdata(dev); 616 struct ata_host *host = dev_get_drvdata(dev);
634 struct ahci_host_priv *hpriv = host->private_data; 617 struct ahci_host_priv *hpriv = host->private_data;
635 int rc; 618 int rc;
@@ -638,12 +621,6 @@ int ahci_platform_resume(struct device *dev)
638 if (rc) 621 if (rc)
639 return rc; 622 return rc;
640 623
641 if (pdata && pdata->resume) {
642 rc = pdata->resume(dev);
643 if (rc)
644 goto disable_resources;
645 }
646
647 rc = ahci_platform_resume_host(dev); 624 rc = ahci_platform_resume_host(dev);
648 if (rc) 625 if (rc)
649 goto disable_resources; 626 goto disable_resources;