summaryrefslogtreecommitdiff
path: root/drivers/cxl/acpi.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2022-01-31 17:07:38 -0800
committerDan Williams <dan.j.williams@intel.com>2022-02-08 22:57:29 -0800
commitc978f1b10aba8ce4f8e1f6fcc86b174e08a6e7f7 (patch)
treee2ccbd2808f2653b5eb4e7b8b3577d50c7764d4e /drivers/cxl/acpi.c
parenta46cfc0f011ce77d120e1cdbf973f733d18f0105 (diff)
cxl/port: Up-level cxl_add_dport() locking requirements to the caller
In preparation for moving dport enumeration into the core, require the port device lock to be acquired by the caller. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/164367759016.324231.105551648350470000.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/cxl/acpi.c')
-rw-r--r--drivers/cxl/acpi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c
index ab2b76532272..5d848b77d8e8 100644
--- a/drivers/cxl/acpi.c
+++ b/drivers/cxl/acpi.c
@@ -342,7 +342,9 @@ static int add_host_bridge_dport(struct device *match, void *arg)
return 0;
}
+ cxl_device_lock(&root_port->dev);
rc = cxl_add_dport(root_port, match, uid, ctx.chbcr);
+ cxl_device_unlock(&root_port->dev);
if (rc) {
dev_err(host, "failed to add downstream port: %s\n",
dev_name(match));