powerpc: Remove `have_of' global variable
authorAnton Vorontsov <avorontsov@ru.mvista.com>
Tue, 9 Dec 2008 09:47:29 +0000 (09:47 +0000)
committerPaul Mackerras <paulus@samba.org>
Tue, 16 Dec 2008 04:52:57 +0000 (15:52 +1100)
The `have_of' variable is a relic from the arch/ppc time, it isn't
useful nowadays.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/include/asm/processor.h
arch/powerpc/kernel/pci-common.c
arch/powerpc/kernel/pci_32.c
arch/powerpc/kernel/setup_32.c
arch/powerpc/kernel/setup_64.c
fs/proc/proc_devtree.c

index cd7a47860e5a6db39f82b410a2c0cd52db0f60b4..d3466490104a557de496a0c531430948384e6264 100644 (file)
@@ -69,8 +69,6 @@ extern int _prep_type;
 
 #ifdef __KERNEL__
 
-extern int have_of;
-
 struct task_struct;
 void start_thread(struct pt_regs *regs, unsigned long fdptr, unsigned long sp);
 void release_thread(struct task_struct *);
index 91c3f52e33a8f690eca68f78f5b723532a5cb94e..1a32db331a5c0aa576d04d717c998ae2b460f367 100644 (file)
@@ -160,8 +160,6 @@ EXPORT_SYMBOL(pci_domain_nr);
  */
 struct pci_controller* pci_find_hose_for_OF_device(struct device_node* node)
 {
-       if (!have_of)
-               return NULL;
        while(node) {
                struct pci_controller *hose, *tmp;
                list_for_each_entry_safe(hose, tmp, &hose_list, list_node)
index 7ad11e592f2ba62a65e6a8b35a9b71958b8e9504..132cd80afa21575fe1ee52db1a4afb68083afe99 100644 (file)
@@ -266,9 +266,6 @@ pci_busdev_to_OF_node(struct pci_bus *bus, int devfn)
 {
        struct device_node *parent, *np;
 
-       if (!have_of)
-               return NULL;
-
        pr_debug("pci_busdev_to_OF_node(%d,0x%x)\n", bus->number, devfn);
        parent = scan_OF_for_pci_bus(bus);
        if (parent == NULL)
@@ -309,8 +306,6 @@ pci_device_from_OF_node(struct device_node* node, u8* bus, u8* devfn)
        struct pci_controller* hose;
        struct pci_dev* dev = NULL;
        
-       if (!have_of)
-               return -ENODEV;
        /* Make sure it's really a PCI device */
        hose = pci_find_hose_for_OF_device(node);
        if (!hose || !hose->dn)
@@ -431,7 +426,7 @@ static int __init pcibios_init(void)
         * numbers vs. kernel bus numbers since we may have to
         * remap them.
         */
-       if (pci_assign_all_buses && have_of)
+       if (pci_assign_all_buses)
                pcibios_make_OF_bus_map();
 
        /* Call common code to handle resource allocation */
index c1a27626a940d1b49c990bbcc3f3f2c5f538b097..cc4679ed95276200117dae65c740f29c066ac245 100644 (file)
@@ -53,8 +53,6 @@ unsigned long ISA_DMA_THRESHOLD;
 unsigned int DMA_MODE_READ;
 unsigned int DMA_MODE_WRITE;
 
-int have_of = 1;
-
 #ifdef CONFIG_VGA_CONSOLE
 unsigned long vgacon_remap_base;
 EXPORT_SYMBOL(vgacon_remap_base);
index 93c875ae985aea732d2b2bc17634e4558252623d..ce48f5c5c54235b6f233ce5d14544f735380bb38 100644 (file)
@@ -70,7 +70,6 @@
 #define DBG(fmt...)
 #endif
 
-int have_of = 1;
 int boot_cpuid = 0;
 u64 ppc64_pft_size;
 
index d777789b7a89e8f177a3ca5163590626bbe29983..de2bba5a3440ad2b4ba04d4f6fabbfe36a7f46f6 100644 (file)
@@ -218,8 +218,7 @@ void proc_device_tree_add_node(struct device_node *np,
 void __init proc_device_tree_init(void)
 {
        struct device_node *root;
-       if ( !have_of )
-               return;
+
        proc_device_tree = proc_mkdir("device-tree", NULL);
        if (proc_device_tree == 0)
                return;