summaryrefslogtreecommitdiff
path: root/include/pci.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-06-28 02:50:56 +0300
committerBin Meng <bmeng.cn@gmail.com>2021-07-15 14:49:46 +0300
commite58f3a7d9b7e5961ca7e362bffd01a134ad3b831 (patch)
tree954cfc72aecf5f32280a7977ddfff1d94efa8bc0 /include/pci.h
parentc11f5abce84f630c92304683d5bde3204c5612c4 (diff)
downloadu-boot-e58f3a7d9b7e5961ca7e362bffd01a134ad3b831.tar.xz
pci: Use const for pci_find_device_id() etc.
These functions don't modify the device-ID struct that is passed in, so mark the argument as const, so the data structure can be declared that way. This allows it to be placed in the rodata section. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'include/pci.h')
-rw-r--r--include/pci.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/pci.h b/include/pci.h
index 8e62235bf4..9a8ba03c8d 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -1064,7 +1064,7 @@ int pci_get_ff(enum pci_size_t size);
* @devp: Returns matching device if found
* @return 0 if found, -ENODEV if not
*/
-int pci_bus_find_devices(struct udevice *bus, struct pci_device_id *ids,
+int pci_bus_find_devices(struct udevice *bus, const struct pci_device_id *ids,
int *indexp, struct udevice **devp);
/**
@@ -1076,7 +1076,7 @@ int pci_bus_find_devices(struct udevice *bus, struct pci_device_id *ids,
* @devp: Returns matching device if found
* @return 0 if found, -ENODEV if not
*/
-int pci_find_device_id(struct pci_device_id *ids, int index,
+int pci_find_device_id(const struct pci_device_id *ids, int index,
struct udevice **devp);
/**