diff mbox

[U-Boot,09/11] dm: pci: Add missing forward declarations

Message ID 1454421490-11037-10-git-send-email-bmeng.cn@gmail.com
State Accepted
Commit 308143effe3079cc997b9b512460930506f09141
Delegated to: Bin Meng
Headers show

Commit Message

Bin Meng Feb. 2, 2016, 1:58 p.m. UTC
When CONFIG_DM_PCI_COMPAT is not on, there is only a forward declaration
for pci_write_config32(). Add other missing ones.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 include/pci.h | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

Comments

Simon Glass Feb. 3, 2016, 3:28 a.m. UTC | #1
On 2 February 2016 at 06:58, Bin Meng <bmeng.cn@gmail.com> wrote:
> When CONFIG_DM_PCI_COMPAT is not on, there is only a forward declaration
> for pci_write_config32(). Add other missing ones.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
>  include/pci.h | 16 +++++-----------
>  1 file changed, 5 insertions(+), 11 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Bin Meng Feb. 5, 2016, 4:49 a.m. UTC | #2
On Wed, Feb 3, 2016 at 11:28 AM, Simon Glass <sjg@chromium.org> wrote:
> On 2 February 2016 at 06:58, Bin Meng <bmeng.cn@gmail.com> wrote:
>> When CONFIG_DM_PCI_COMPAT is not on, there is only a forward declaration
>> for pci_write_config32(). Add other missing ones.
>>
>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>> ---
>>
>>  include/pci.h | 16 +++++-----------
>>  1 file changed, 5 insertions(+), 11 deletions(-)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>

applied to u-boot-x86/master, thanks!
diff mbox

Patch

diff --git a/include/pci.h b/include/pci.h
index d0d152c..68548b0 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -1050,6 +1050,11 @@  int dm_pci_write_config32(struct udevice *dev, int offset, u32 value);
  * functions, rather than byte/word/dword. But both are supported.
  */
 int pci_write_config32(pci_dev_t pcidev, int offset, u32 value);
+int pci_write_config16(pci_dev_t pcidev, int offset, u16 value);
+int pci_write_config8(pci_dev_t pcidev, int offset, u8 value);
+int pci_read_config32(pci_dev_t pcidev, int offset, u32 *valuep);
+int pci_read_config16(pci_dev_t pcidev, int offset, u16 *valuep);
+int pci_read_config8(pci_dev_t pcidev, int offset, u8 *valuep);
 
 #ifdef CONFIG_DM_PCI_COMPAT
 /* Compatibility with old naming */
@@ -1059,8 +1064,6 @@  static inline int pci_write_config_dword(pci_dev_t pcidev, int offset,
 	return pci_write_config32(pcidev, offset, value);
 }
 
-int pci_write_config16(pci_dev_t pcidev, int offset, u16 value);
-
 /* Compatibility with old naming */
 static inline int pci_write_config_word(pci_dev_t pcidev, int offset,
 					u16 value)
@@ -1068,8 +1071,6 @@  static inline int pci_write_config_word(pci_dev_t pcidev, int offset,
 	return pci_write_config16(pcidev, offset, value);
 }
 
-int pci_write_config8(pci_dev_t pcidev, int offset, u8 value);
-
 /* Compatibility with old naming */
 static inline int pci_write_config_byte(pci_dev_t pcidev, int offset,
 					u8 value)
@@ -1077,8 +1078,6 @@  static inline int pci_write_config_byte(pci_dev_t pcidev, int offset,
 	return pci_write_config8(pcidev, offset, value);
 }
 
-int pci_read_config32(pci_dev_t pcidev, int offset, u32 *valuep);
-
 /* Compatibility with old naming */
 static inline int pci_read_config_dword(pci_dev_t pcidev, int offset,
 					u32 *valuep)
@@ -1086,8 +1085,6 @@  static inline int pci_read_config_dword(pci_dev_t pcidev, int offset,
 	return pci_read_config32(pcidev, offset, valuep);
 }
 
-int pci_read_config16(pci_dev_t pcidev, int offset, u16 *valuep);
-
 /* Compatibility with old naming */
 static inline int pci_read_config_word(pci_dev_t pcidev, int offset,
 				       u16 *valuep)
@@ -1095,15 +1092,12 @@  static inline int pci_read_config_word(pci_dev_t pcidev, int offset,
 	return pci_read_config16(pcidev, offset, valuep);
 }
 
-int pci_read_config8(pci_dev_t pcidev, int offset, u8 *valuep);
-
 /* Compatibility with old naming */
 static inline int pci_read_config_byte(pci_dev_t pcidev, int offset,
 				       u8 *valuep)
 {
 	return pci_read_config8(pcidev, offset, valuep);
 }
-
 #endif /* CONFIG_DM_PCI_COMPAT */
 
 /**