summaryrefslogtreecommitdiff
path: root/target/linux/ramips/patches-3.8/0078-clocksource-make-clocksource_of_init-pass-a-device_n.patch
blob: 218dfc389ee91a10b34901af3dbfebc71e6ec9f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 0e00abf87d50e80b1ce5bda65a4d89adc530ba10 Mon Sep 17 00:00:00 2001
From: John Crispin <blogic@openwrt.org>
Date: Thu, 23 May 2013 16:58:12 +0200
Subject: [PATCH 78/79] clocksource: make clocksource_of_init() pass a
 device_node pointer

If we look at the clocksources that are OF enabled we will notice, that they
all do a of_find_matching_node() when being called. This patch changes
clocksource_of_init() to always pass the struct device_node pointer to the
init function.

Signed-off-by: John Crispin <blogic@openwrt.org>
---
 drivers/clocksource/clksrc-of.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clocksource/clksrc-of.c b/drivers/clocksource/clksrc-of.c
index bdabdaa..3ef11fb 100644
--- a/drivers/clocksource/clksrc-of.c
+++ b/drivers/clocksource/clksrc-of.c
@@ -26,10 +26,10 @@ void __init clocksource_of_init(void)
 {
 	struct device_node *np;
 	const struct of_device_id *match;
-	void (*init_func)(void);
+	void (*init_func)(struct device_node *);
 
 	for_each_matching_node_and_match(np, __clksrc_of_table, &match) {
 		init_func = match->data;
-		init_func();
+		init_func(np);
 	}
 }
-- 
1.7.10.4