瀏覽代碼

misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices

Adding more than 10 pci-endpoint-test devices results in
"kobject_add_internal failed for pci-endpoint-test.1 with -EEXIST, don't
try to register things with the same name in the same directory". This
is because the length of the "name" is limited to 20 characters. Change
the length of the name to 24 in order to support upto 10000
pci-endpoint-test devices.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Kishon Vijay Abraham I 6 年之前
父節點
當前提交
eb81fe449a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/misc/pci_endpoint_test.c

+ 1 - 1
drivers/misc/pci_endpoint_test.c

@@ -734,7 +734,7 @@ static int pci_endpoint_test_probe(struct pci_dev *pdev,
 {
 	int err;
 	int id;
-	char name[20];
+	char name[24];
 	enum pci_barno bar;
 	void __iomem *base;
 	struct device *dev = &pdev->dev;