aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata.h
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2008-04-07 09:47:21 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-04-17 15:44:24 -0400
commit127102aea2ea9ec4e9ca233e2b1a75c8d3b058c4 (patch)
tree92fb528eac658adbc7307a009bd8a7558db2658a /drivers/ata/libata.h
parent350756f6dab6d37ef9ed3f18dec520e88969ddac (diff)
libata: make SFF support optional
Now that SFF support is completely separated out from the core layer, it can be made optional. Add CONFIG_ATA_SFF and let SFF drivers depend on it. If CONFIG_ATA_SFF isn't set, all codes in libata-sff.c and data structures for SFF support are disabled. This saves good number of bytes for small systems. Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/ata/libata.h')
-rw-r--r--drivers/ata/libata.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
index 87f54a1db3b0..6b70a624828c 100644
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -42,8 +42,10 @@ static inline int ata_is_builtin_hardreset(ata_reset_fn_t reset)
42{ 42{
43 if (reset == sata_std_hardreset) 43 if (reset == sata_std_hardreset)
44 return 1; 44 return 1;
45#ifdef CONFIG_ATA_SFF
45 if (reset == sata_sff_hardreset) 46 if (reset == sata_sff_hardreset)
46 return 1; 47 return 1;
48#endif
47 return 0; 49 return 0;
48} 50}
49 51
@@ -206,9 +208,11 @@ extern int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
206extern void ata_eh_finish(struct ata_port *ap); 208extern void ata_eh_finish(struct ata_port *ap);
207 209
208/* libata-sff.c */ 210/* libata-sff.c */
211#ifdef CONFIG_ATA_SFF
209extern void ata_dev_select(struct ata_port *ap, unsigned int device, 212extern void ata_dev_select(struct ata_port *ap, unsigned int device,
210 unsigned int wait, unsigned int can_sleep); 213 unsigned int wait, unsigned int can_sleep);
211extern u8 ata_irq_on(struct ata_port *ap); 214extern u8 ata_irq_on(struct ata_port *ap);
212extern void ata_pio_task(struct work_struct *work); 215extern void ata_pio_task(struct work_struct *work);
216#endif /* CONFIG_ATA_SFF */
213 217
214#endif /* __LIBATA_H__ */ 218#endif /* __LIBATA_H__ */