aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-10-11 17:12:35 -0400
committerJeff Garzik <jeff@garzik.org>2007-10-12 14:55:47 -0400
commit2855568b1ee4f58ef2c0a13ddfceb4b0b216b7ed (patch)
tree79262af301c2386c2c391942991742653bc7935e /include/linux/libata.h
parentb06ce3e51e3df4394a584c234f11240b1c6f8d5b (diff)
[libata] struct pci_dev related cleanups
* remove pointless pci_dev_to_dev() wrapper. Just directly reference the embedded struct device like everyone else does. * pata_cs5520: delete cs5520_remove_one(), it was a duplicate of ata_pci_remove_one() * linux/libata.h: don't bother including linux/pci.h, we don't need it. Simply declare 'struct pci_dev' and assume interested parties will include the header, as they should be doing anyway. * linux/libata.h: consolidate all CONFIG_PCI declarations into a single location in the header. Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h33
1 files changed, 14 insertions, 19 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 2439f1fa47a1..229a9ff9f924 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -28,7 +28,6 @@
28 28
29#include <linux/delay.h> 29#include <linux/delay.h>
30#include <linux/interrupt.h> 30#include <linux/interrupt.h>
31#include <linux/pci.h>
32#include <linux/dma-mapping.h> 31#include <linux/dma-mapping.h>
33#include <asm/scatterlist.h> 32#include <asm/scatterlist.h>
34#include <linux/io.h> 33#include <linux/io.h>
@@ -107,12 +106,6 @@ static inline u32 ata_msg_init(int dval, int default_msg_enable_bits)
107/* defines only for the constants which don't work well as enums */ 106/* defines only for the constants which don't work well as enums */
108#define ATA_TAG_POISON 0xfafbfcfdU 107#define ATA_TAG_POISON 0xfafbfcfdU
109 108
110/* move to PCI layer? */
111static inline struct device *pci_dev_to_dev(struct pci_dev *pdev)
112{
113 return &pdev->dev;
114}
115
116enum { 109enum {
117 /* various global constants */ 110 /* various global constants */
118 LIBATA_MAX_PRD = ATA_MAX_PRD / 2, 111 LIBATA_MAX_PRD = ATA_MAX_PRD / 2,
@@ -766,18 +759,7 @@ extern int sata_std_hardreset(struct ata_link *link, unsigned int *class,
766extern void ata_std_postreset(struct ata_link *link, unsigned int *classes); 759extern void ata_std_postreset(struct ata_link *link, unsigned int *classes);
767extern void ata_port_disable(struct ata_port *); 760extern void ata_port_disable(struct ata_port *);
768extern void ata_std_ports(struct ata_ioports *ioaddr); 761extern void ata_std_ports(struct ata_ioports *ioaddr);
769#ifdef CONFIG_PCI 762
770extern int ata_pci_init_one (struct pci_dev *pdev,
771 const struct ata_port_info * const * ppi);
772extern void ata_pci_remove_one (struct pci_dev *pdev);
773#ifdef CONFIG_PM
774extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg);
775extern int __must_check ata_pci_device_do_resume(struct pci_dev *pdev);
776extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg);
777extern int ata_pci_device_resume(struct pci_dev *pdev);
778#endif
779extern int ata_pci_clear_simplex(struct pci_dev *pdev);
780#endif /* CONFIG_PCI */
781extern struct ata_host *ata_host_alloc(struct device *dev, int max_ports); 763extern struct ata_host *ata_host_alloc(struct device *dev, int max_ports);
782extern struct ata_host *ata_host_alloc_pinfo(struct device *dev, 764extern struct ata_host *ata_host_alloc_pinfo(struct device *dev,
783 const struct ata_port_info * const * ppi, int n_ports); 765 const struct ata_port_info * const * ppi, int n_ports);
@@ -935,6 +917,19 @@ static inline int ata_acpi_cbl_80wire(struct ata_port *ap) { return 0; }
935#endif 917#endif
936 918
937#ifdef CONFIG_PCI 919#ifdef CONFIG_PCI
920struct pci_dev;
921
922extern int ata_pci_init_one (struct pci_dev *pdev,
923 const struct ata_port_info * const * ppi);
924extern void ata_pci_remove_one (struct pci_dev *pdev);
925#ifdef CONFIG_PM
926extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg);
927extern int __must_check ata_pci_device_do_resume(struct pci_dev *pdev);
928extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg);
929extern int ata_pci_device_resume(struct pci_dev *pdev);
930#endif
931extern int ata_pci_clear_simplex(struct pci_dev *pdev);
932
938struct pci_bits { 933struct pci_bits {
939 unsigned int reg; /* PCI config register to read */ 934 unsigned int reg; /* PCI config register to read */
940 unsigned int width; /* 1 (8 bit), 2 (16 bit), 4 (32 bit) */ 935 unsigned int width; /* 1 (8 bit), 2 (16 bit), 4 (32 bit) */