Skip to content

Commit 6b82b3e

Browse files
Anton Vorontsovpaulusmack
authored andcommitted
powerpc: Remove `have_of' global variable
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>
1 parent 0efbb57 commit 6b82b3e

6 files changed

Lines changed: 2 additions & 15 deletions

File tree

‎arch/powerpc/include/asm/processor.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ extern int _prep_type;
6969

7070
#ifdef __KERNEL__
7171

72-
extern int have_of;
73-
7472
struct task_struct;
7573
void start_thread(struct pt_regs *regs, unsigned long fdptr, unsigned long sp);
7674
void release_thread(struct task_struct *);

‎arch/powerpc/kernel/pci-common.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,6 @@ EXPORT_SYMBOL(pci_domain_nr);
160160
*/
161161
struct pci_controller* pci_find_hose_for_OF_device(struct device_node* node)
162162
{
163-
if (!have_of)
164-
return NULL;
165163
while(node) {
166164
struct pci_controller *hose, *tmp;
167165
list_for_each_entry_safe(hose, tmp, &hose_list, list_node)

‎arch/powerpc/kernel/pci_32.c‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,6 @@ pci_busdev_to_OF_node(struct pci_bus *bus, int devfn)
266266
{
267267
struct device_node *parent, *np;
268268

269-
if (!have_of)
270-
return NULL;
271-
272269
pr_debug("pci_busdev_to_OF_node(%d,0x%x)\n", bus->number, devfn);
273270
parent = scan_OF_for_pci_bus(bus);
274271
if (parent == NULL)
@@ -309,8 +306,6 @@ pci_device_from_OF_node(struct device_node* node, u8* bus, u8* devfn)
309306
struct pci_controller* hose;
310307
struct pci_dev* dev = NULL;
311308

312-
if (!have_of)
313-
return -ENODEV;
314309
/* Make sure it's really a PCI device */
315310
hose = pci_find_hose_for_OF_device(node);
316311
if (!hose || !hose->dn)
@@ -431,7 +426,7 @@ static int __init pcibios_init(void)
431426
* numbers vs. kernel bus numbers since we may have to
432427
* remap them.
433428
*/
434-
if (pci_assign_all_buses && have_of)
429+
if (pci_assign_all_buses)
435430
pcibios_make_OF_bus_map();
436431

437432
/* Call common code to handle resource allocation */

‎arch/powerpc/kernel/setup_32.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ unsigned long ISA_DMA_THRESHOLD;
5353
unsigned int DMA_MODE_READ;
5454
unsigned int DMA_MODE_WRITE;
5555

56-
int have_of = 1;
57-
5856
#ifdef CONFIG_VGA_CONSOLE
5957
unsigned long vgacon_remap_base;
6058
EXPORT_SYMBOL(vgacon_remap_base);

‎arch/powerpc/kernel/setup_64.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
#define DBG(fmt...)
7171
#endif
7272

73-
int have_of = 1;
7473
int boot_cpuid = 0;
7574
u64 ppc64_pft_size;
7675

‎fs/proc/proc_devtree.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,7 @@ void proc_device_tree_add_node(struct device_node *np,
218218
void __init proc_device_tree_init(void)
219219
{
220220
struct device_node *root;
221-
if ( !have_of )
222-
return;
221+
223222
proc_device_tree = proc_mkdir("device-tree", NULL);
224223
if (proc_device_tree == 0)
225224
return;

0 commit comments

Comments
 (0)