Merge branch 'sh-fixes-for-linus' of git://github.com/pmundt/linux-sh
[pandora-kernel.git] / drivers / ata / ahci_platform.c
index c03277d..ec55595 100644 (file)
@@ -65,7 +65,7 @@ static struct scsi_host_template ahci_platform_sht = {
 static int __init ahci_probe(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
-       struct ahci_platform_data *pdata = dev->platform_data;
+       struct ahci_platform_data *pdata = dev_get_platdata(dev);
        const struct platform_device_id *id = platform_get_device_id(pdev);
        struct ata_port_info pi = ahci_port_info[id->driver_data];
        const struct ata_port_info *ppi[] = { &pi, NULL };
@@ -191,7 +191,7 @@ err0:
 static int __devexit ahci_remove(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
-       struct ahci_platform_data *pdata = dev->platform_data;
+       struct ahci_platform_data *pdata = dev_get_platdata(dev);
        struct ata_host *host = dev_get_drvdata(dev);
 
        ata_host_detach(host);
@@ -202,11 +202,18 @@ static int __devexit ahci_remove(struct platform_device *pdev)
        return 0;
 }
 
+static const struct of_device_id ahci_of_match[] = {
+       { .compatible = "calxeda,hb-ahci", },
+       {},
+};
+MODULE_DEVICE_TABLE(of, ahci_of_match);
+
 static struct platform_driver ahci_driver = {
        .remove = __devexit_p(ahci_remove),
        .driver = {
                .name = "ahci",
                .owner = THIS_MODULE,
+               .of_match_table = ahci_of_match,
        },
        .id_table       = ahci_devtype,
 };