LinuxKPI: pci.h make pci_dev argument const for pci_{read,write}_config*()
Make the struct pci_dev argument to the pci_{read,write}_config*() functions "const" to match the Linux definition as some drivers try to pass in a const argument which we currently fail to honor. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D32644
This commit is contained in:
parent
490f9d8f0e
commit
ed5600f532
@ -692,7 +692,7 @@ pci_disable_link_state(struct pci_dev *pdev, uint32_t flags)
|
||||
}
|
||||
|
||||
static inline int
|
||||
pci_read_config_byte(struct pci_dev *pdev, int where, u8 *val)
|
||||
pci_read_config_byte(const struct pci_dev *pdev, int where, u8 *val)
|
||||
{
|
||||
|
||||
*val = (u8)pci_read_config(pdev->dev.bsddev, where, 1);
|
||||
@ -700,7 +700,7 @@ pci_read_config_byte(struct pci_dev *pdev, int where, u8 *val)
|
||||
}
|
||||
|
||||
static inline int
|
||||
pci_read_config_word(struct pci_dev *pdev, int where, u16 *val)
|
||||
pci_read_config_word(const struct pci_dev *pdev, int where, u16 *val)
|
||||
{
|
||||
|
||||
*val = (u16)pci_read_config(pdev->dev.bsddev, where, 2);
|
||||
@ -708,7 +708,7 @@ pci_read_config_word(struct pci_dev *pdev, int where, u16 *val)
|
||||
}
|
||||
|
||||
static inline int
|
||||
pci_read_config_dword(struct pci_dev *pdev, int where, u32 *val)
|
||||
pci_read_config_dword(const struct pci_dev *pdev, int where, u32 *val)
|
||||
{
|
||||
|
||||
*val = (u32)pci_read_config(pdev->dev.bsddev, where, 4);
|
||||
@ -716,7 +716,7 @@ pci_read_config_dword(struct pci_dev *pdev, int where, u32 *val)
|
||||
}
|
||||
|
||||
static inline int
|
||||
pci_write_config_byte(struct pci_dev *pdev, int where, u8 val)
|
||||
pci_write_config_byte(const struct pci_dev *pdev, int where, u8 val)
|
||||
{
|
||||
|
||||
pci_write_config(pdev->dev.bsddev, where, val, 1);
|
||||
@ -724,7 +724,7 @@ pci_write_config_byte(struct pci_dev *pdev, int where, u8 val)
|
||||
}
|
||||
|
||||
static inline int
|
||||
pci_write_config_word(struct pci_dev *pdev, int where, u16 val)
|
||||
pci_write_config_word(const struct pci_dev *pdev, int where, u16 val)
|
||||
{
|
||||
|
||||
pci_write_config(pdev->dev.bsddev, where, val, 2);
|
||||
@ -732,7 +732,7 @@ pci_write_config_word(struct pci_dev *pdev, int where, u16 val)
|
||||
}
|
||||
|
||||
static inline int
|
||||
pci_write_config_dword(struct pci_dev *pdev, int where, u32 val)
|
||||
pci_write_config_dword(const struct pci_dev *pdev, int where, u32 val)
|
||||
{
|
||||
|
||||
pci_write_config(pdev->dev.bsddev, where, val, 4);
|
||||
|
Loading…
x
Reference in New Issue
Block a user