diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-07-19 19:40:51 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-07-19 20:58:35 -0400 |
commit | a92336a1176b2119eaa990a1e8bf3109665fdbc6 (patch) | |
tree | af8ac49b47136acddb5320b9a62be2361bfaf99c /drivers/xen/xen-pciback/conf_space.h | |
parent | c288b67b9b4d65790e1a1a1fd982330730b68f46 (diff) |
xen/pciback: Drop two backends, squash and cleanup some code.
- Remove the slot and controller controller backend as they
are not used.
- Document the find pciback_[read|write]_config_[byte|word|dword]
to make it easier to find.
- Collapse the code from conf_space_capability_msi into pciback_ops.c
- Collapse conf_space_capability_[pm|vpd].c in conf_space_capability.c
[and remove the conf_space_capability.h file]
- Rename all visible functions from pciback to xen_pcibk.
- Rename all the printk/pr_info, etc that use the "pciback" to say
"xen-pciback".
- Convert functions that are not referenced outside the code to be
static to save on name space.
- Do the same thing for structures that are internal to the driver.
- Run checkpatch.pl after the renames and fixup its warnings and
fix any compile errors caused by the variable rename
- Cleanup any structs that checkpath.pl commented about or just
look odd.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen/xen-pciback/conf_space.h')
-rw-r--r-- | drivers/xen/xen-pciback/conf_space.h | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/xen/xen-pciback/conf_space.h b/drivers/xen/xen-pciback/conf_space.h index 50ebef216828..e56c934ad137 100644 --- a/drivers/xen/xen-pciback/conf_space.h +++ b/drivers/xen/xen-pciback/conf_space.h | |||
@@ -69,35 +69,35 @@ struct config_field_entry { | |||
69 | /* Add fields to a device - the add_fields macro expects to get a pointer to | 69 | /* Add fields to a device - the add_fields macro expects to get a pointer to |
70 | * the first entry in an array (of which the ending is marked by size==0) | 70 | * the first entry in an array (of which the ending is marked by size==0) |
71 | */ | 71 | */ |
72 | int pciback_config_add_field_offset(struct pci_dev *dev, | 72 | int xen_pcibk_config_add_field_offset(struct pci_dev *dev, |
73 | const struct config_field *field, | 73 | const struct config_field *field, |
74 | unsigned int offset); | 74 | unsigned int offset); |
75 | 75 | ||
76 | static inline int pciback_config_add_field(struct pci_dev *dev, | 76 | static inline int xen_pcibk_config_add_field(struct pci_dev *dev, |
77 | const struct config_field *field) | 77 | const struct config_field *field) |
78 | { | 78 | { |
79 | return pciback_config_add_field_offset(dev, field, 0); | 79 | return xen_pcibk_config_add_field_offset(dev, field, 0); |
80 | } | 80 | } |
81 | 81 | ||
82 | static inline int pciback_config_add_fields(struct pci_dev *dev, | 82 | static inline int xen_pcibk_config_add_fields(struct pci_dev *dev, |
83 | const struct config_field *field) | 83 | const struct config_field *field) |
84 | { | 84 | { |
85 | int i, err = 0; | 85 | int i, err = 0; |
86 | for (i = 0; field[i].size != 0; i++) { | 86 | for (i = 0; field[i].size != 0; i++) { |
87 | err = pciback_config_add_field(dev, &field[i]); | 87 | err = xen_pcibk_config_add_field(dev, &field[i]); |
88 | if (err) | 88 | if (err) |
89 | break; | 89 | break; |
90 | } | 90 | } |
91 | return err; | 91 | return err; |
92 | } | 92 | } |
93 | 93 | ||
94 | static inline int pciback_config_add_fields_offset(struct pci_dev *dev, | 94 | static inline int xen_pcibk_config_add_fields_offset(struct pci_dev *dev, |
95 | const struct config_field *field, | 95 | const struct config_field *field, |
96 | unsigned int offset) | 96 | unsigned int offset) |
97 | { | 97 | { |
98 | int i, err = 0; | 98 | int i, err = 0; |
99 | for (i = 0; field[i].size != 0; i++) { | 99 | for (i = 0; field[i].size != 0; i++) { |
100 | err = pciback_config_add_field_offset(dev, &field[i], offset); | 100 | err = xen_pcibk_config_add_field_offset(dev, &field[i], offset); |
101 | if (err) | 101 | if (err) |
102 | break; | 102 | break; |
103 | } | 103 | } |
@@ -105,22 +105,22 @@ static inline int pciback_config_add_fields_offset(struct pci_dev *dev, | |||
105 | } | 105 | } |
106 | 106 | ||
107 | /* Read/Write the real configuration space */ | 107 | /* Read/Write the real configuration space */ |
108 | int pciback_read_config_byte(struct pci_dev *dev, int offset, u8 *value, | 108 | int xen_pcibk_read_config_byte(struct pci_dev *dev, int offset, u8 *value, |
109 | void *data); | ||
110 | int pciback_read_config_word(struct pci_dev *dev, int offset, u16 *value, | ||
111 | void *data); | ||
112 | int pciback_read_config_dword(struct pci_dev *dev, int offset, u32 *value, | ||
113 | void *data); | ||
114 | int pciback_write_config_byte(struct pci_dev *dev, int offset, u8 value, | ||
115 | void *data); | ||
116 | int pciback_write_config_word(struct pci_dev *dev, int offset, u16 value, | ||
117 | void *data); | ||
118 | int pciback_write_config_dword(struct pci_dev *dev, int offset, u32 value, | ||
119 | void *data); | 109 | void *data); |
110 | int xen_pcibk_read_config_word(struct pci_dev *dev, int offset, u16 *value, | ||
111 | void *data); | ||
112 | int xen_pcibk_read_config_dword(struct pci_dev *dev, int offset, u32 *value, | ||
113 | void *data); | ||
114 | int xen_pcibk_write_config_byte(struct pci_dev *dev, int offset, u8 value, | ||
115 | void *data); | ||
116 | int xen_pcibk_write_config_word(struct pci_dev *dev, int offset, u16 value, | ||
117 | void *data); | ||
118 | int xen_pcibk_write_config_dword(struct pci_dev *dev, int offset, u32 value, | ||
119 | void *data); | ||
120 | 120 | ||
121 | int pciback_config_capability_init(void); | 121 | int xen_pcibk_config_capability_init(void); |
122 | 122 | ||
123 | int pciback_config_header_add_fields(struct pci_dev *dev); | 123 | int xen_pcibk_config_header_add_fields(struct pci_dev *dev); |
124 | int pciback_config_capability_add_fields(struct pci_dev *dev); | 124 | int xen_pcibk_config_capability_add_fields(struct pci_dev *dev); |
125 | 125 | ||
126 | #endif /* __XEN_PCIBACK_CONF_SPACE_H__ */ | 126 | #endif /* __XEN_PCIBACK_CONF_SPACE_H__ */ |