diff options
author | Tejun Heo <htejun@gmail.com> | 2008-03-27 06:14:25 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-17 15:44:20 -0400 |
commit | d8b81b8008a0f131e01bb6eb5c681c900c327e2b (patch) | |
tree | 3f6ef48e0787fc952f3f58e7a2991d7eab82fbf7 | |
parent | 03faab7827e4e45823fd27c47b84c133e20a0cd0 (diff) |
libata: kill unused ata_flush_cache()
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>
-rw-r--r-- | drivers/ata/libata-core.c | 26 | ||||
-rw-r--r-- | drivers/ata/libata.h | 1 |
2 files changed, 0 insertions, 27 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 4d78f5debb6c..fa205d7c5bea 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -4800,32 +4800,6 @@ int ata_link_offline(struct ata_link *link) | |||
4800 | return 0; | 4800 | return 0; |
4801 | } | 4801 | } |
4802 | 4802 | ||
4803 | int ata_flush_cache(struct ata_device *dev) | ||
4804 | { | ||
4805 | unsigned int err_mask; | ||
4806 | u8 cmd; | ||
4807 | |||
4808 | if (!ata_try_flush_cache(dev)) | ||
4809 | return 0; | ||
4810 | |||
4811 | if (dev->flags & ATA_DFLAG_FLUSH_EXT) | ||
4812 | cmd = ATA_CMD_FLUSH_EXT; | ||
4813 | else | ||
4814 | cmd = ATA_CMD_FLUSH; | ||
4815 | |||
4816 | /* This is wrong. On a failed flush we get back the LBA of the lost | ||
4817 | sector and we should (assuming it wasn't aborted as unknown) issue | ||
4818 | a further flush command to continue the writeback until it | ||
4819 | does not error */ | ||
4820 | err_mask = ata_do_simple_cmd(dev, cmd); | ||
4821 | if (err_mask) { | ||
4822 | ata_dev_printk(dev, KERN_ERR, "failed to flush cache\n"); | ||
4823 | return -EIO; | ||
4824 | } | ||
4825 | |||
4826 | return 0; | ||
4827 | } | ||
4828 | |||
4829 | #ifdef CONFIG_PM | 4803 | #ifdef CONFIG_PM |
4830 | static int ata_host_request_pm(struct ata_host *host, pm_message_t mesg, | 4804 | static int ata_host_request_pm(struct ata_host *host, pm_message_t mesg, |
4831 | unsigned int action, unsigned int ehi_flags, | 4805 | unsigned int action, unsigned int ehi_flags, |
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h index 5e8d0359bccb..11b5f67a19d4 100644 --- a/drivers/ata/libata.h +++ b/drivers/ata/libata.h | |||
@@ -96,7 +96,6 @@ extern void ata_qc_issue(struct ata_queued_cmd *qc); | |||
96 | extern void __ata_qc_complete(struct ata_queued_cmd *qc); | 96 | extern void __ata_qc_complete(struct ata_queued_cmd *qc); |
97 | extern int ata_check_atapi_dma(struct ata_queued_cmd *qc); | 97 | extern int ata_check_atapi_dma(struct ata_queued_cmd *qc); |
98 | extern void swap_buf_le16(u16 *buf, unsigned int buf_words); | 98 | extern void swap_buf_le16(u16 *buf, unsigned int buf_words); |
99 | extern int ata_flush_cache(struct ata_device *dev); | ||
100 | extern void ata_dev_init(struct ata_device *dev); | 99 | extern void ata_dev_init(struct ata_device *dev); |
101 | extern void ata_link_init(struct ata_port *ap, struct ata_link *link, int pmp); | 100 | extern void ata_link_init(struct ata_port *ap, struct ata_link *link, int pmp); |
102 | extern int sata_link_init_spd(struct ata_link *link); | 101 | extern int sata_link_init_spd(struct ata_link *link); |