diff options
author | Shuo Liu <shuo.liu@intel.com> | 2024-04-18 00:44:42 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-04-22 13:26:02 +0000 |
commit | 101685de0c1a61f8940d007abcacfa5cc4291791 (patch) | |
tree | 80e59d47d058c9d7bff5e7343070213c299cfdf8 /src/soc | |
parent | 48097a17f151bf3843bd921391125ba8de56ac65 (diff) |
device_util: Handle domain device in dev_get_domain
When the input device pointer pointing to a domain device,
dev_get_domain returns the input device itself.
TEST=Build and boot on intel/archercity CRB
Change-Id: I3a278a8f573de95406ee256fba17767def4ad75d
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81957
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/intel/xeon_sp/chip_common.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/soc/intel/xeon_sp/chip_common.c b/src/soc/intel/xeon_sp/chip_common.c index d8e7d143b0..d0eab02972 100644 --- a/src/soc/intel/xeon_sp/chip_common.c +++ b/src/soc/intel/xeon_sp/chip_common.c @@ -136,11 +136,7 @@ int iio_pci_domain_socket_from_dev(const struct device *dev) const struct device *domain; union xeon_domain_path dn; - if (dev->path.type == DEVICE_PATH_DOMAIN) - domain = dev; - else - domain = dev_get_domain(dev); - + domain = dev_get_domain(dev); if (!domain) return -1; @@ -162,11 +158,7 @@ int iio_pci_domain_stack_from_dev(const struct device *dev) const struct device *domain; union xeon_domain_path dn; - if (dev->path.type == DEVICE_PATH_DOMAIN) - domain = dev; - else - domain = dev_get_domain(dev); - + domain = dev_get_domain(dev); if (!domain) return -1; |