Skip to content

Commit

Permalink
libata: fix build without BMDMA
Browse files Browse the repository at this point in the history
fix these errors:
drivers/ata/libata-sff.c:2538:3: error: implicit declaration of function
'ata_pci_bmdma_prepare_host'
drivers/ata/libata-sff.c:2549:40: error: 'ata_bmdma_interrupt'
undeclared (first use in this function)

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Alexander Beregalov authored and Jeff Garzik committed Nov 17, 2011
1 parent ff95613 commit aab9440
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/ata/libata-sff.c
Original file line number Diff line number Diff line change
Expand Up @@ -2533,21 +2533,25 @@ static int ata_pci_init_one(struct pci_dev *pdev,
if (rc)
goto out;

#ifdef CONFIG_ATA_BMDMA
if (bmdma)
/* prepare and activate BMDMA host */
rc = ata_pci_bmdma_prepare_host(pdev, ppi, &host);
else
#endif
/* prepare and activate SFF host */
rc = ata_pci_sff_prepare_host(pdev, ppi, &host);
if (rc)
goto out;
host->private_data = host_priv;
host->flags |= hflags;

#ifdef CONFIG_ATA_BMDMA
if (bmdma) {
pci_set_master(pdev);
rc = ata_pci_sff_activate_host(host, ata_bmdma_interrupt, sht);
} else
#endif
rc = ata_pci_sff_activate_host(host, ata_sff_interrupt, sht);
out:
if (rc == 0)
Expand Down

0 comments on commit aab9440

Please sign in to comment.