]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ahci_platform: Drop support for imx53-ahci platform device type
authorHans de Goede <hdegoede@redhat.com>
Sat, 22 Feb 2014 16:22:54 +0000 (17:22 +0100)
committerNitin Garg <nitin.garg@freescale.com>
Fri, 16 Jan 2015 03:17:18 +0000 (21:17 -0600)
Since the 3.13 release the ahci_imx driver has proper devicetree enabled
support for ahci on imx53 and that is used instead of the old board file
created imx53-ahci platform device.

Note this patch also complete drops the id-table, an id-table is not needed
for a single id platform driver, the name field in the driver struct suffices.

And the code already has an explicit "MODULE_ALIAS("platform:ahci");" so the
id-table is not needed for that either.

Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
(cherry picked from commit c093e1d36e317c5ac2dc788f407119259fc260fe)

drivers/ata/ahci_platform.c

index 566b4f1af750611cf195214680a97e3fb28209e7..3c1ed15d0c125509b3e6bbc42f8a2a491d40e053 100644 (file)
 
 static void ahci_host_stop(struct ata_host *host);
 
-enum ahci_type {
-       AHCI,           /* standard platform ahci */
-       IMX53_AHCI,     /* ahci on i.mx53 */
-};
-
-static struct platform_device_id ahci_devtype[] = {
-       {
-               .name = "ahci",
-               .driver_data = AHCI,
-       }, {
-               .name = "imx53-ahci",
-               .driver_data = IMX53_AHCI,
-       }, {
-               /* sentinel */
-       }
-};
-MODULE_DEVICE_TABLE(platform, ahci_devtype);
-
 struct ata_port_operations ahci_platform_ops = {
        .inherits       = &ahci_ops,
        .host_stop      = ahci_host_stop,
 };
 EXPORT_SYMBOL_GPL(ahci_platform_ops);
 
-static struct ata_port_operations ahci_platform_retry_srst_ops = {
-       .inherits       = &ahci_pmp_retry_srst_ops,
-       .host_stop      = ahci_host_stop,
-};
-
-static const struct ata_port_info ahci_port_info[] = {
-       /* by features */
-       [AHCI] = {
-               .flags          = AHCI_FLAG_COMMON,
-               .pio_mask       = ATA_PIO4,
-               .udma_mask      = ATA_UDMA6,
-               .port_ops       = &ahci_platform_ops,
-       },
-       [IMX53_AHCI] = {
-               .flags          = AHCI_FLAG_COMMON,
-               .pio_mask       = ATA_PIO4,
-               .udma_mask      = ATA_UDMA6,
-               .port_ops       = &ahci_platform_retry_srst_ops,
-       },
+static const struct ata_port_info ahci_port_info = {
+       .flags          = AHCI_FLAG_COMMON,
+       .pio_mask       = ATA_PIO4,
+       .udma_mask      = ATA_UDMA6,
+       .port_ops       = &ahci_platform_ops,
 };
 
 static struct scsi_host_template ahci_platform_sht = {
@@ -417,7 +385,6 @@ static int ahci_probe(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
        struct ahci_platform_data *pdata = dev_get_platdata(dev);
-       const struct platform_device_id *id = platform_get_device_id(pdev);
        const struct ata_port_info *pi_template;
        struct ahci_host_priv *hpriv;
        int rc;
@@ -445,7 +412,7 @@ static int ahci_probe(struct platform_device *pdev)
        if (pdata && pdata->ata_port_info)
                pi_template = pdata->ata_port_info;
        else
-               pi_template = &ahci_port_info[id ? id->driver_data : 0];
+               pi_template = &ahci_port_info;
 
        rc = ahci_platform_init_host(pdev, hpriv, pi_template,
                                     pdata ? pdata->force_port_map : 0,
@@ -639,7 +606,6 @@ static struct platform_driver ahci_driver = {
                .of_match_table = ahci_of_match,
                .pm = &ahci_pm_ops,
        },
-       .id_table       = ahci_devtype,
 };
 module_platform_driver(ahci_driver);