summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2024-03-14 09:24:12 +0100
committerFelix Held <felix-coreboot@felixheld.de>2024-04-18 11:25:32 +0000
commite56a41b33fd2e52a6bfeec5a0a845c9c2d4e9b01 (patch)
tree171adf5198c954d3ee87d434878f6b7f3a20d759 /src/device
parent72b8d2fbc7e7ccf0c20c5bd49ffa3665e5e7c8cd (diff)
device/device_util: Use const qualifier
Allows to use the function in more places that expect the struct device to be readonly. TEST=Build and boot on intel/archercity CRB Change-Id: Iac04fe6931a43070f6638b399adbff2ce64829c9 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Signed-off-by: Shuo Liu <shuo.liu@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81275 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/device')
-rw-r--r--src/device/device_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/device/device_util.c b/src/device/device_util.c
index 02641c162e..10e4a0dd1c 100644
--- a/src/device/device_util.c
+++ b/src/device/device_util.c
@@ -248,7 +248,7 @@ const char *dev_name(const struct device *dev)
}
/* Returns the PCI domain for the given PCI device */
-struct device *dev_get_pci_domain(struct device *dev)
+const struct device *dev_get_pci_domain(const struct device *dev)
{
/* Walk up the tree up to the PCI domain */
while (dev && dev->upstream && !is_root_device(dev)) {