[Cbe-oss-dev] Build fix for ericvh.git#systemsim-2.6.22

Julio M. Merino Vidal jmerino at ac.upc.edu
Wed Jun 6 22:48:59 EST 2007


Hi,

[ CC'ing the branch maintainer ]

I was trying to build the ericvh.git#systemsim-2.6.22 branch and
hit this error:

  LD      .tmp_vmlinux1
drivers/built-in.o: In function `.systemsim_bd_init':
systemsim_bd.c:(.init.text+0x3514): undefined reference to `.find_path_device'
drivers/built-in.o: In function `.do_systemsim_net_probe':
(.init.text+0x38e4): undefined reference to `.find_path_device'
drivers/built-in.o: In function `.do_systemsim_net_probe':
(.init.text+0x38f8): undefined reference to `.find_path_device'
make: *** [.tmp_vmlinux1] Error 1

The following patch fixes it and lets me build and boot a kernel for
the systemsim.  Can you please apply it?

Thank you!

---- cut here ----
Use the of_find_node_by_path interface

The find_path_device interface was replaced by of_find_node_by_path
in commit 8c8dc322486d5394dc981bef9276dd0ce6c8d1ce.  Adjust the
systemsim-specific devices (block and network) to honor this change.

Signed-off-by: Julio M. Merino Vidal <jmerino at ac.upc.edu>

diff --git a/drivers/block/systemsim_bd.c b/drivers/block/systemsim_bd.c
index 959815d..e19f986 100644
--- a/drivers/block/systemsim_bd.c
+++ b/drivers/block/systemsim_bd.c
@@ -229,7 +229,7 @@ static int __init systemsim_bd_init(void)
 	int err = -ENOMEM;
 	int i;
 
-	systemsim = find_path_device("/systemsim");
+	systemsim = of_find_node_by_path("/systemsim");
 
 	if (systemsim == NULL) {
 		printk("NO SYSTEMSIM BOGUS DISK DETECTED\n");
diff --git a/drivers/net/systemsim_net.c b/drivers/net/systemsim_net.c
index b11fdc1..526f8aa 100644
--- a/drivers/net/systemsim_net.c
+++ b/drivers/net/systemsim_net.c
@@ -103,12 +103,12 @@ static int systemsim_net_probedev(int devno, void *buf)
 	struct device_node *net;
 	unsigned int *reg;
 
-	systemsim = find_path_device("/systemsim");
+	systemsim = of_find_node_by_path("/systemsim");
 
 	if (systemsim == NULL) {
 		return -1;
 	}
-	net = find_path_device("/systemsim/bogus-net at 0");
+	net = of_find_node_by_path("/systemsim/bogus-net at 0");
 	if (net == NULL) {
 		return -1;
 	}
---- cut here ----



More information about the cbe-oss-dev mailing list