aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Krogerus <[email protected]>2021-02-04 17:17:11 +0300
committerGreg Kroah-Hartman <[email protected]>2021-02-05 10:08:19 +0100
commitc8134c004ccf131ec41e8c58b096927bb8ba1cd8 (patch)
tree8a1a31845ac02d02ae9fdebfaf771ed57eb7692b
parentb1638ee56c1a3fddee062beac93d2fe528eb2eca (diff)
xhci: ext-caps: Use software node API with the properties
This replaces the platform_device_add_properties() call with the safer device_create_managed_software_node() that does exactly the same, but can also guarantee that the lifetime of the node that is created for the device is tied to the lifetime of device itself. Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/usb/host/xhci-ext-caps.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-ext-caps.c b/drivers/usb/host/xhci-ext-caps.c
index 3351d07c431f..7a4c2c4ad50e 100644
--- a/drivers/usb/host/xhci-ext-caps.c
+++ b/drivers/usb/host/xhci-ext-caps.c
@@ -54,7 +54,8 @@ static int xhci_create_intel_xhci_sw_pdev(struct xhci_hcd *xhci, u32 cap_offset)
}
if (pci->device == PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI) {
- ret = platform_device_add_properties(pdev, role_switch_props);
+ ret = device_create_managed_software_node(&pdev->dev, role_switch_props,
+ NULL);
if (ret) {
dev_err(dev, "failed to register device properties\n");
platform_device_put(pdev);