mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
extcon: Create named extcon link nowarn
Avoid warning:
[ 0.366122] sysfs: cannot create duplicate filename '/class/extcon/usb2-phy'
[ 0.366821] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.19.154 #120
[ 0.367385] Hardware name: Rockchip RK3566 EVB1 DDR4 V10 Board (DT)
[ 0.367945] Call trace:
[ 0.368186] dump_backtrace+0x0/0x15c
[ 0.368520] show_stack+0x14/0x1c
[ 0.368830] dump_stack+0xb8/0xf0
[ 0.369139] sysfs_warn_dup+0x68/0x80
[ 0.369469] sysfs_do_create_link_sd+0x90/0xc8
[ 0.369870] sysfs_create_link+0x2c/0x40
[ 0.370227] extcon_dev_register+0x5a4/0x6fc
[ 0.370614] devm_extcon_dev_register+0x44/0x84
[ 0.371030] rockchip_usb2phy_probe+0x26c/0xba4
[ 0.371444] platform_drv_probe+0x7c/0xb4
[ 0.371813] really_probe+0x488/0x520
[ 0.372145] driver_probe_device+0x60/0xf8
[ 0.372520] device_driver_attach+0x68/0xa4
[ 0.372896] __driver_attach+0xc0/0x13c
[ 0.373249] bus_for_each_dev+0x78/0xc0
[ 0.373601] driver_attach+0x20/0x28
[ 0.373930] bus_add_driver+0xfc/0x1dc
[ 0.374271] driver_register+0x74/0x108
[ 0.374621] __platform_driver_register+0x40/0x48
[ 0.375049] rockchip_usb2phy_driver_init+0x18/0x20
[ 0.375486] do_one_initcall+0x90/0x26c
[ 0.375840] do_initcall_level+0xbc/0x160
[ 0.376203] do_basic_setup+0x30/0x48
[ 0.376533] kernel_init_freeable+0xb0/0x134
[ 0.376923] kernel_init+0x14/0x290
[ 0.377242] ret_from_fork+0x10/0x18
[ 0.377610] extcon extcon1: failed to create extcon usb2-phy link
Fixes: 513c60a1ba ("extcon: Add named extcon link")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ieac0e071b5bae8613aaf829a0aeed64ff6524ea2
This commit is contained in:
@@ -1350,8 +1350,8 @@ int extcon_dev_register(struct extcon_dev *edev)
|
||||
{
|
||||
const char *name = extcon_get_link_name(edev);
|
||||
|
||||
ret = sysfs_create_link(&edev->dev.class->p->subsys.kobj,
|
||||
&edev->dev.kobj, name);
|
||||
ret = sysfs_create_link_nowarn(&edev->dev.class->p->subsys.kobj,
|
||||
&edev->dev.kobj, name);
|
||||
if (ret)
|
||||
dev_err(&edev->dev,
|
||||
"failed to create extcon %s link\n", name);
|
||||
|
||||
Reference in New Issue
Block a user