git-libata-all: sata_via build fix
[powerpc.git] / drivers / ata / sata_via.c
index 1d855f5..d105d2c 100644 (file)
@@ -93,6 +93,10 @@ static struct pci_driver svia_pci_driver = {
        .name                   = DRV_NAME,
        .id_table               = svia_pci_tbl,
        .probe                  = svia_init_one,
+#ifdef CONFIG_PM
+       .suspend                = ata_pci_device_suspend,
+       .resume                 = ata_pci_device_resume,
+#endif
        .remove                 = ata_pci_remove_one,
 };
 
@@ -268,6 +272,7 @@ static void svia_noop_freeze(struct ata_port *ap)
 /**
  *     vt6420_prereset - prereset for vt6420
  *     @ap: target ATA port
+ *     @deadline: deadline jiffies for the operation
  *
  *     SCR registers on vt6420 are pieces of shit and may hang the
  *     whole machine completely if accessed with the wrong timing.
@@ -284,7 +289,7 @@ static void svia_noop_freeze(struct ata_port *ap)
  *     RETURNS:
  *     0 on success, -errno otherwise.
  */
-static int vt6420_prereset(struct ata_port *ap)
+static int vt6420_prereset(struct ata_port *ap, unsigned long deadline)
 {
        struct ata_eh_context *ehc = &ap->eh_context;
        unsigned long timeout = jiffies + (HZ * 5);
@@ -329,7 +334,7 @@ static int vt6420_prereset(struct ata_port *ap)
 
  skip_scr:
        /* wait for !BSY */
-       ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT);
+       ata_wait_ready(ap, deadline);
 
        return 0;
 }
@@ -406,7 +411,7 @@ static int vt6420_prepare_host(struct pci_dev *pdev, struct ata_host **r_host)
        struct ata_host *host;
        int rc;
 
-       rc = ata_pci_prepare_native_host(pdev, ppi, 2, &host);
+       rc = ata_pci_prepare_native_host(pdev, ppi, &host);
        if (rc)
                return rc;
        *r_host = host;