Skip to contentSkip to conversation

Another OCP cleanups

PATCH David Gibson 1 participant 1 message Oct 4, 2002

lore
Share & tools
lore
#0 lore raw

This patch removes a bunch of unused OCP functions, and the "core_map" global variable with them. It also marks several more functions static.

drivers/ocp/ocp-probe.c +5 -5
diff -urN linux-bluefish-old/drivers/ocp/ocp-probe.c linux-bluefish/drivers/ocp/ocp-probe.c
@@ -45,7 +45,7 @@
 static struct ocp_bus *ocp_alloc_bus(void);
 unsigned int ocp_do_scan_bus(struct ocp_bus *bus);
 
-struct ocp_bus * __devinit ocp_add_new_bus(struct ocp_bus *parent, struct ocp_device *dev, int busnr)
+static struct ocp_bus * __devinit ocp_add_new_bus(struct ocp_bus *parent, struct ocp_device *dev, int busnr)
 {
 	struct ocp_bus *child;
 
@@ -92,7 +92,7 @@
 
 }
 
-struct ocp_device * __devinit ocp_setup_dev(struct ocp_device *temp, unsigned int index)
+static struct ocp_device * __devinit ocp_setup_dev(struct ocp_device *temp, unsigned int index)
 {
 	struct ocp_device *dev;
 
@@ -126,7 +126,7 @@
 	return dev;
 }
 
-struct ocp_device * __devinit ocp_scan_device(struct ocp_device *temp, unsigned int func)
+static struct ocp_device * __devinit ocp_scan_device(struct ocp_device *temp, unsigned int func)
 {
 
 	struct ocp_device *dev;
@@ -139,7 +139,7 @@
 	list_add_tail(&dev->bus_list, &bus->devices);
 	return dev;
 }
-unsigned int __devinit ocp_do_scan_bus(struct ocp_bus *bus)
+static unsigned int __devinit ocp_do_scan_bus(struct ocp_bus *bus)
 {
 	unsigned int max;
 	struct list_head *ln;
@@ -204,7 +204,7 @@
 	return 0;
 }
 
-struct ocp_bus * __devinit ocp_alloc_primary_bus(int bus)
+static struct ocp_bus * __devinit ocp_alloc_primary_bus(int bus)
 {
 	struct ocp_bus *b;
 
drivers/ocp/ocp.c +0 -76

102 lines not on this page · raw message

include/linux/ocp.h +0 -3
diff -urN linux-bluefish-old/include/linux/ocp.h linux-bluefish/include/linux/ocp.h
@@ -238,17 +238,14 @@
 }
 extern void ocp_init(void);
 extern struct ocp_def core_ocp[];
-extern struct ocp_def *core_map;
 extern struct ocp_bus *ocp_scan_bus(int bus, void *sysdata);
 extern struct bus_type ocp_bus_type;
 extern struct ocp_device *ocp_get_dev(unsigned int device, int index);
-extern unsigned int ocp_get_device(unsigned int index);
 extern unsigned long ocp_get_paddr(unsigned int device, int dev_num);
 extern unsigned int ocp_get_max(unsigned int device);
 extern int ocp_get_irq(unsigned int device, int dev_num);
 extern int ocp_get_pm(unsigned int device, int dev_num);
 extern unsigned int ocp_get_num(unsigned int device);
-extern unsigned int ocp_get_vendor(unsigned int device, int dev_num);
 extern unsigned ocp_get_bus_start(unsigned int device, int bus_num);
 extern unsigned ocp_get_bus_end(unsigned int device, int bus_num);
 

--
David Gibson | For every complex problem there is a
[email protected] | solution which is simple, neat and
| wrong.
http://www.ozlabs.org/people/dgibson

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/