ahci_platform: enable hotplug unbinding
[firefly-linux-kernel-4.4.55.git] / drivers / ata / ahci_platform.c
index b1ae48054dc5773eab42917d5e9d10f9764602ae..c598fd7cbf3f1ede5b2c838f020f109e9d1cd15b 100644 (file)
@@ -75,7 +75,7 @@ static struct scsi_host_template ahci_platform_sht = {
        AHCI_SHT("ahci_platform"),
 };
 
-static int __init ahci_probe(struct platform_device *pdev)
+static int __devinit ahci_probe(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
        struct ahci_platform_data *pdata = dev_get_platdata(dev);
@@ -238,7 +238,7 @@ static int __devexit ahci_remove(struct platform_device *pdev)
        return 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int ahci_suspend(struct device *dev)
 {
        struct ahci_platform_data *pdata = dev_get_platdata(dev);
@@ -326,6 +326,7 @@ static const struct of_device_id ahci_of_match[] = {
 MODULE_DEVICE_TABLE(of, ahci_of_match);
 
 static struct platform_driver ahci_driver = {
+       .probe = ahci_probe,
        .remove = __devexit_p(ahci_remove),
        .driver = {
                .name = "ahci",
@@ -338,7 +339,7 @@ static struct platform_driver ahci_driver = {
 
 static int __init ahci_init(void)
 {
-       return platform_driver_probe(&ahci_driver, ahci_probe);
+       return platform_driver_register(&ahci_driver);
 }
 module_init(ahci_init);