patch-2.3.35 linux/drivers/video/sbusfb.c

Next file: linux/drivers/video/tcxfb.c
Previous file: linux/drivers/video/pm2fb.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.34/linux/drivers/video/sbusfb.c linux/drivers/video/sbusfb.c
@@ -965,7 +965,7 @@
 extern void (*prom_palette)(int);
 
 static void __init sbusfb_init_fb(int node, int parent, int fbtype,
-				      struct linux_sbus_device *sbdp)
+				  struct sbus_dev *sbdp)
 {
 	struct fb_fix_screeninfo *fix;
 	struct fb_var_screeninfo *var;
@@ -991,6 +991,7 @@
 	disp = &fb->disp;
 	type = &fb->type;
 	
+	spin_lock_init(&fb->lock);
 	fb->prom_node = node;
 	fb->prom_parent = parent;
 	fb->sbdp = sbdp;
@@ -1165,8 +1166,8 @@
 int __init sbusfb_init(void)
 {
 	int type;
-	struct linux_sbus_device *sbdp;
-	struct linux_sbus *sbus;
+	struct sbus_dev *sbdp;
+	struct sbus_bus *sbus;
 	char prom_name[40];
 	extern int con_is_present(void);
 	
@@ -1198,17 +1199,19 @@
 		}
 	}
 #endif
-	if (!SBus_chain) return 0;
+	if (sbus_root == NULL)
+		return 0;
 	for_all_sbusdev(sbdp, sbus) {
 		type = known_card(sbdp->prom_name);
-		if (type == FBTYPE_NOTYPE) continue;
-		if (prom_getproperty(sbdp->prom_node, "emulation", prom_name, sizeof(prom_name)) > 0) {
+		if (type == FBTYPE_NOTYPE)
+			continue;
+		if (prom_getproperty(sbdp->prom_node, "emulation",
+				     prom_name, sizeof(prom_name)) > 0) {
 			type = known_card(prom_name);
-			if (type == FBTYPE_NOTYPE) type = known_card(sbdp->prom_name);
+			if (type == FBTYPE_NOTYPE)
+				type = known_card(sbdp->prom_name);
 		}
-		prom_apply_sbus_ranges(sbdp->my_bus, &sbdp->reg_addrs[0],
-				       sbdp->num_registers, sbdp);
-		sbusfb_init_fb(sbdp->prom_node, sbdp->my_bus->prom_node, type, sbdp);
+		sbusfb_init_fb(sbdp->prom_node, sbdp->bus->prom_node, type, sbdp);
 	}
 	return 0;
 }	

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)