]> git.baikalelectronics.ru Git - kernel.git/commit
of: Make OF framebuffer device names unique
authorMichal Suchanek <msuchanek@suse.de>
Wed, 1 Feb 2023 16:22:47 +0000 (10:22 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Feb 2023 18:11:43 +0000 (19:11 +0100)
commitea9ab6f64f48cb51181039210fa7f29d00dc374a
tree0bb0d9c8b5a0aba7ca2599748a366c85f2aa0ec6
parentc826cab374de6e62fb29e7e7255ebe8a06251340
of: Make OF framebuffer device names unique

[ Upstream commit 241d2fb56a18473af5f2ff0d512992a996eb64dd ]

Since Linux 5.19 this error is observed:

sysfs: cannot create duplicate filename '/devices/platform/of-display'

This is because multiple devices with the same name 'of-display' are
created on the same bus. Update the code to create numbered device names
for the displays.

Also, fix a node refcounting issue when exiting the boot display loop.

cc: linuxppc-dev@lists.ozlabs.org
References: https://bugzilla.kernel.org/show_bug.cgi?id=216095
Fixes: 0896b392fc14 ("of: Create platform devices for OF framebuffers")
Reported-by: Erhard F. <erhard_f@mailbox.org>
Suggested-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Link: https://lore.kernel.org/r/20230201162247.3575506-1-robh@kernel.org
[robh: Rework to avoid node refcount leaks]
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/of/platform.c