Merge tag 'trace-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux...
[cascardo/linux.git] / drivers / ata / ahci_platform.c
index b10d81d..06f1d59 100644 (file)
@@ -32,9 +32,7 @@ static const struct ata_port_info ahci_port_info = {
 static int ahci_probe(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
-       struct ahci_platform_data *pdata = dev_get_platdata(dev);
        struct ahci_host_priv *hpriv;
-       unsigned long hflags = 0;
        int rc;
 
        hpriv = ahci_platform_get_resources(pdev);
@@ -45,30 +43,14 @@ static int ahci_probe(struct platform_device *pdev)
        if (rc)
                return rc;
 
-       /*
-        * Some platforms might need to prepare for mmio region access,
-        * which could be done in the following init call. So, the mmio
-        * region shouldn't be accessed before init (if provided) has
-        * returned successfully.
-        */
-       if (pdata && pdata->init) {
-               rc = pdata->init(dev, hpriv->mmio);
-               if (rc)
-                       goto disable_resources;
-       }
-
        if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci"))
-               hflags |= AHCI_HFLAG_NO_FBS | AHCI_HFLAG_NO_NCQ;
+               hpriv->flags |= AHCI_HFLAG_NO_FBS | AHCI_HFLAG_NO_NCQ;
 
-       rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
-                                    hflags, 0, 0);
+       rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info);
        if (rc)
-               goto pdata_exit;
+               goto disable_resources;
 
        return 0;
-pdata_exit:
-       if (pdata && pdata->exit)
-               pdata->exit(dev);
 disable_resources:
        ahci_platform_disable_resources(hpriv);
        return rc;
@@ -78,6 +60,8 @@ static SIMPLE_DEV_PM_OPS(ahci_pm_ops, ahci_platform_suspend,
                         ahci_platform_resume);
 
 static const struct of_device_id ahci_of_match[] = {
+       { .compatible = "generic-ahci", },
+       /* Keep the following compatibles for device tree compatibility */
        { .compatible = "snps,spear-ahci", },
        { .compatible = "snps,exynos5440-ahci", },
        { .compatible = "ibm,476gtr-ahci", },