driver core: Fix test_async_probe_init saves device in wrong array
PATCH 1/1 driver core: Fix test_async_probe_init saves device in wrong array
In test_async_probe_init, second set of asynchronous devices are saved in sync_dev[sync_id], which should be async_dev[async_id]. This makes these devices not unregistered when exit.
Quoted 3 lines
modprobe
test_async_driver_probe&& \
modprobe -rtest_async_driver_probe&& \
modprobetest_async_driver_probe
...
Quoted 2 lines
sysfs: cannot create duplicate filename '/devices/platform/test_async_driver.4'
kobject_add_internalfailed for test_async_driver.4 with-EEXIST,
don't try to register things with the same name in the same directory.
Fixes 57ea974fb871 ("driver core: Rewrite test_async_driver_probe to cover serialization and NUMA affinity")
Signed-off-by Chen Zhongjin <[email protected]>
--- drivers/base/test/test_async_driver_probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/test/test_async_driver_probe.c +1 -1
@@ -145,7 +145,7 @@ static int __init test_async_probe_init(void) calltime =ktime_get ();for_each_online_cpu (cpu) { nid =cpu_to_node (cpu); - pdev = &sync_dev[sync_id]; + pdev = &async_dev[async_id]; *pdev = test_platform_device_register_node("test_async_driver", async_id,
Signature · 1 line
2.17.1