Subject: Re: [Bug 216095] New: sysfs: cannot create duplicate filename '/devices/platform/of-display'

From: "Erhard F." <[email-masked]>
Date: Wed, 15 Jun 2022 13:28:16 +0200

On Wed, 15 Jun 2022 00:01:01 +1000
Michael Ellerman <[email-masked]> wrote:

> Hi Erhard,
> 
> This is presumably caused by:
> 
>   52b1b46c39ae ("of: Create platform devices for OF framebuffers")
> 
> Can you try the patch below?
> 
> cheers
> 
> 
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index 3507095a69f6..a70ff9df5cb9 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -556,7 +556,7 @@ static int __init of_platform_default_populate_init(void)
>  			if (!of_get_property(node, "linux,opened", NULL) ||
>  			    !of_get_property(node, "linux,boot-display", NULL))
>  				continue;
> -			dev = of_platform_device_create(node, "of-display", NULL);
> +			dev = of_platform_device_create(node, NULL, NULL);
>  			if (WARN_ON(!dev))
>  				return -ENOMEM;
>  			boot_display = node;
> @@ -565,7 +565,7 @@ static int __init of_platform_default_populate_init(void)
>  		for_each_node_by_type(node, "display") {
>  			if (!of_get_property(node, "linux,opened", NULL) || node == boot_display)
>  				continue;
> -			of_platform_device_create(node, "of-display", NULL);
> +			of_platform_device_create(node, NULL, NULL);
>  		}
>  
>  	} else {
> 

Hi Michael!

Applied your patch on top of v5.19-rc2 and can confirm it works, thanks!

Also the "Using unsupported 1920x1080 (null) at a0008000, depth=8, pitch=2048" later on is gone in the dmesg.

Cheers