diff mbox series

[v4,2/4] clocksource/drivers/timer-of: Use unique device name instead of timer

Message ID 20191016144747.29538-3-geert+renesas@glider.be (mailing list archive)
State Mainlined
Commit 4411464d6f8b5e5759637235a6f2b2a85c2be0f1
Delegated to: Geert Uytterhoeven
Headers show
Series clocksource/drivers/timer-of/renesas-ostm improvements | expand

Commit Message

Geert Uytterhoeven Oct. 16, 2019, 2:47 p.m. UTC
If a hardware-specific driver does not provide a name, the timer-of core
falls back to device_node.name.  Due to generic DT node naming policies,
that name is almost always "timer", and thus doesn't identify the actual
timer used.

Fix this by using device_node.full_name instead, which includes the unit
addrees.

Example impact on /proc/timer_list:

    -Clock Event Device: timer
    +Clock Event Device: timer@fcfec400

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v4:
  - New.
---
 drivers/clocksource/timer-of.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rob Herring (Arm) Oct. 16, 2019, 3:02 p.m. UTC | #1
On Wed, Oct 16, 2019 at 9:52 AM Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
>
> If a hardware-specific driver does not provide a name, the timer-of core
> falls back to device_node.name.  Due to generic DT node naming policies,
> that name is almost always "timer", and thus doesn't identify the actual
> timer used.
>
> Fix this by using device_node.full_name instead, which includes the unit
> addrees.
>
> Example impact on /proc/timer_list:
>
>     -Clock Event Device: timer
>     +Clock Event Device: timer@fcfec400
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> v4:
>   - New.
> ---
>  drivers/clocksource/timer-of.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Good. One less device_node.name pointer use to get rid of. I want to
drop it from the struct and stop storing both node name strings.

Reviewed-by: Rob Herring <robh@kernel.org>

Rob
diff mbox series

Patch

diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c
index 92cfb160657b81e2..572da477c6d35c5e 100644
--- a/drivers/clocksource/timer-of.c
+++ b/drivers/clocksource/timer-of.c
@@ -192,7 +192,7 @@  int __init timer_of_init(struct device_node *np, struct timer_of *to)
 	}
 
 	if (!to->clkevt.name)
-		to->clkevt.name = np->name;
+		to->clkevt.name = np->full_name;
 
 	to->np = np;