Index | Thread | Search

From:
Mark Kettenis <mark.kettenis@xs4all.nl>
Subject:
Re: rkdwhdmi: pass correct node to pinctrl_byname()
To:
Jonathan Matthew <jonathan@d14n.org>
Cc:
tech@openbsd.org, kettenis@openbsd.org
Date:
Mon, 24 Mar 2025 11:41:00 +0100

Download raw body.

Thread
> Date: Mon, 24 Mar 2025 08:44:21 +1000
> From: Jonathan Matthew <jonathan@d14n.org>
> 
> While looking through rkdwhdmi(4), I noticed the attach function
> uses sc->sc_node before it's assigned.  faa->fa_node is valid
> at this point, so it should use that instead.
> 
> ok?

Did you test this on an RK3399 board?  If so, ok kettenis@

> Index: rkdwhdmi.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/fdt/rkdwhdmi.c,v
> diff -u -p -r1.8 rkdwhdmi.c
> --- rkdwhdmi.c	21 Aug 2024 11:24:12 -0000	1.8
> +++ rkdwhdmi.c	23 Mar 2025 11:59:46 -0000
> @@ -130,7 +136,7 @@ rkdwhdmi_attach(struct device *parent, s
>  		return;
>  	}
>  
> -	pinctrl_byname(sc->sc_node, "default");
> +	pinctrl_byname(faa->fa_node, "default");
>  
>  	clock_enable(faa->fa_node, "iahb");
>  	clock_enable(faa->fa_node, "isfr");
> 
>