]> git.baikalelectronics.ru Git - kernel.git/commit
misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices
authorKishon Vijay Abraham I <kishon@ti.com>
Tue, 17 Mar 2020 10:01:57 +0000 (15:31 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Apr 2020 07:08:41 +0000 (09:08 +0200)
commitd62e6735afc814c2d608070b21028a843f3d18be
tree360e14a63675233caa4370c49f752b45c6bef3b7
parentb50762c543093b12f79105afff9cefe73d304c9a
misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices

commit b5212d0eaf36bb77bdff1d15ddf6389bece50407 upstream.

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 commit 83ae0721f861 ("misc: Add host side PCI driver for PCI
test function device") limited the length of the "name" to 20 characters.
Change the length of the name to 24 in order to support upto 10000
pci-endpoint-test devices.

Fixes: 83ae0721f861 ("misc: Add host side PCI driver for PCI test function device")
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: stable@vger.kernel.org # v4.14+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/pci_endpoint_test.c