libata: kill unused ata_flush_cache()
authorTejun Heo <htejun@gmail.com>
Thu, 27 Mar 2008 10:14:25 +0000 (19:14 +0900)
committerJeff Garzik <jgarzik@redhat.com>
Thu, 17 Apr 2008 19:44:20 +0000 (15:44 -0400)
ata_flush_code() hasn't been in use for quite some time now.  Kill it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-core.c
drivers/ata/libata.h

index 4d78f5d..fa205d7 100644 (file)
@@ -4800,32 +4800,6 @@ int ata_link_offline(struct ata_link *link)
        return 0;
 }
 
-int ata_flush_cache(struct ata_device *dev)
-{
-       unsigned int err_mask;
-       u8 cmd;
-
-       if (!ata_try_flush_cache(dev))
-               return 0;
-
-       if (dev->flags & ATA_DFLAG_FLUSH_EXT)
-               cmd = ATA_CMD_FLUSH_EXT;
-       else
-               cmd = ATA_CMD_FLUSH;
-
-       /* This is wrong. On a failed flush we get back the LBA of the lost
-          sector and we should (assuming it wasn't aborted as unknown) issue
-          a further flush command to continue the writeback until it
-          does not error */
-       err_mask = ata_do_simple_cmd(dev, cmd);
-       if (err_mask) {
-               ata_dev_printk(dev, KERN_ERR, "failed to flush cache\n");
-               return -EIO;
-       }
-
-       return 0;
-}
-
 #ifdef CONFIG_PM
 static int ata_host_request_pm(struct ata_host *host, pm_message_t mesg,
                               unsigned int action, unsigned int ehi_flags,
index 5e8d035..11b5f67 100644 (file)
@@ -96,7 +96,6 @@ extern void ata_qc_issue(struct ata_queued_cmd *qc);
 extern void __ata_qc_complete(struct ata_queued_cmd *qc);
 extern int ata_check_atapi_dma(struct ata_queued_cmd *qc);
 extern void swap_buf_le16(u16 *buf, unsigned int buf_words);
-extern int ata_flush_cache(struct ata_device *dev);
 extern void ata_dev_init(struct ata_device *dev);
 extern void ata_link_init(struct ata_port *ap, struct ata_link *link, int pmp);
 extern int sata_link_init_spd(struct ata_link *link);