[PATCH 2/7] usb: dwc3: pci: Set an easily recognizable device name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Set the device name for PCI glue layer to "dwc3-pci.BB:SS.FF" where BB
is PCI bus number, SS is PCI slot, and FF is PCI function number.

Signed-off-by: Thinh Nguyen <thinhn@xxxxxxxxxxxx>
---
 drivers/usb/dwc3/dwc3-pci.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c
index c961a94d136b..11b1eb1e2cda 100644
--- a/drivers/usb/dwc3/dwc3-pci.c
+++ b/drivers/usb/dwc3/dwc3-pci.c
@@ -229,6 +229,9 @@ static int dwc3_pci_probe(struct pci_dev *pci,
 	dwc->dwc3->dev.parent = dev;
 	ACPI_COMPANION_SET(&dwc->dwc3->dev, ACPI_COMPANION(dev));
 
+	dev_set_name(dev, "dwc3-pci.%02x:%02x.%d", pci->bus->number,
+		     PCI_SLOT(pci->devfn), PCI_FUNC(pci->devfn));
+
 	ret = dwc3_pci_quirks(dwc);
 	if (ret)
 		goto err;
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux