Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sparc: move EXPORT_SYMBOL to the symbols definition

Move all applicable EXPORT_SYMBOL()s to the file where the respective
symbol is defined.

Removed all the includes that are no longer needed in sparc_ksyms_32.c

Comment all remaining EXPORT_SYMBOL()s in sparc_ksyms_32.c

Two symbols are shared with sparc64 thus the exports were removed from
the sparc_ksyms_64.c too, along with the include their ommission made
redundant.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

Additions by Julian Calaby:
* Moved EXPORT_SYMBOL()s for prom functions to their rightful places.
* Made some minor cleanups to the includes and comments of sparc_ksyms_32.c
* Made another subtraction from sparc_ksyms_64.c
* Updated and tidied commit message.
* Rebased patch over sparc-2.6.git HEAD.
* Ensured that all modified files have the correct includes.

Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Sam Ravnborg and committed by
David S. Miller
6943f3da 45536ffc

+82 -134
+2 -1
arch/sparc/kernel/auxio_32.c
··· 76 76 return sbus_readb(auxio_register); 77 77 return 0; 78 78 } 79 + EXPORT_SYMBOL(get_auxio); 79 80 80 81 void set_auxio(unsigned char bits_on, unsigned char bits_off) 81 82 { ··· 103 102 }; 104 103 spin_unlock_irqrestore(&auxio_lock, flags); 105 104 } 106 - 105 + EXPORT_SYMBOL(set_auxio); 107 106 108 107 /* sun4m power control register (AUXIO2) */ 109 108
+2
arch/sparc/kernel/cpu.c
··· 5 5 */ 6 6 7 7 #include <linux/kernel.h> 8 + #include <linux/module.h> 8 9 #include <linux/init.h> 9 10 #include <linux/smp.h> 10 11 #include <linux/threads.h> ··· 21 20 #include "kernel.h" 22 21 23 22 DEFINE_PER_CPU(cpuinfo_sparc, __cpu_data) = { 0 }; 23 + EXPORT_PER_CPU_SYMBOL(__cpu_data); 24 24 25 25 struct cpu_info { 26 26 int psr_vers;
+3
arch/sparc/kernel/idprom.c
··· 8 8 #include <linux/kernel.h> 9 9 #include <linux/types.h> 10 10 #include <linux/init.h> 11 + #include <linux/module.h> 11 12 12 13 #include <asm/oplib.h> 13 14 #include <asm/idprom.h> 14 15 15 16 struct idprom *idprom; 17 + EXPORT_SYMBOL(idprom); 18 + 16 19 static struct idprom idprom_buffer; 17 20 18 21 #ifdef CONFIG_SPARC32
+15
arch/sparc/kernel/ioport.c
··· 120 120 sprintf(name, "phys_%08x", (u32)offset); 121 121 return _sparc_alloc_io(0, offset, size, name); 122 122 } 123 + EXPORT_SYMBOL(ioremap); 123 124 124 125 /* 125 126 * Comlimentary to ioremap(). ··· 142 141 kfree(res); 143 142 } 144 143 } 144 + EXPORT_SYMBOL(iounmap); 145 145 146 146 void __iomem *of_ioremap(struct resource *res, unsigned long offset, 147 147 unsigned long size, char *name) ··· 239 237 { 240 238 printk("sbus_set_sbus64: unsupported\n"); 241 239 } 240 + EXPORT_SYMBOL(sbus_set_sbus64); 242 241 243 242 /* 244 243 * Allocate a chunk of memory suitable for DMA. ··· 439 436 *pba = virt_to_phys(va); /* equals virt_to_bus (R.I.P.) for us. */ 440 437 return (void *) res->start; 441 438 } 439 + EXPORT_SYMBOL(pci_alloc_consistent); 442 440 443 441 /* Free and unmap a consistent DMA buffer. 444 442 * cpu_addr is what was returned from pci_alloc_consistent, ··· 481 477 482 478 free_pages(pgp, get_order(n)); 483 479 } 480 + EXPORT_SYMBOL(pci_free_consistent); 484 481 485 482 /* Map a single buffer of the indicated size for DMA in streaming mode. 486 483 * The 32-bit bus address to use is returned. ··· 496 491 /* IIep is write-through, not flushing. */ 497 492 return virt_to_phys(ptr); 498 493 } 494 + EXPORT_SYMBOL(pci_map_single); 499 495 500 496 /* Unmap a single streaming mode DMA translation. The dma_addr and size 501 497 * must match what was provided for in a previous pci_map_single call. All ··· 514 508 (size + PAGE_SIZE-1) & PAGE_MASK); 515 509 } 516 510 } 511 + EXPORT_SYMBOL(pci_unmap_single); 517 512 518 513 /* 519 514 * Same as pci_map_single, but with pages. ··· 526 519 /* IIep is write-through, not flushing. */ 527 520 return page_to_phys(page) + offset; 528 521 } 522 + EXPORT_SYMBOL(pci_map_page); 529 523 530 524 void pci_unmap_page(struct pci_dev *hwdev, 531 525 dma_addr_t dma_address, size_t size, int direction) ··· 534 526 BUG_ON(direction == PCI_DMA_NONE); 535 527 /* mmu_inval_dma_area XXX */ 536 528 } 529 + EXPORT_SYMBOL(pci_unmap_page); 537 530 538 531 /* Map a set of buffers described by scatterlist in streaming 539 532 * mode for DMA. This is the scather-gather version of the ··· 566 557 } 567 558 return nents; 568 559 } 560 + EXPORT_SYMBOL(pci_map_sg); 569 561 570 562 /* Unmap a set of streaming mode DMA translations. 571 563 * Again, cpu read rules concerning calls here are the same as for ··· 588 578 } 589 579 } 590 580 } 581 + EXPORT_SYMBOL(pci_unmap_sg); 591 582 592 583 /* Make physical memory consistent for a single 593 584 * streaming mode DMA translation before or after a transfer. ··· 608 597 (size + PAGE_SIZE-1) & PAGE_MASK); 609 598 } 610 599 } 600 + EXPORT_SYMBOL(pci_dma_sync_single_for_cpu); 611 601 612 602 void pci_dma_sync_single_for_device(struct pci_dev *hwdev, dma_addr_t ba, size_t size, int direction) 613 603 { ··· 618 606 (size + PAGE_SIZE-1) & PAGE_MASK); 619 607 } 620 608 } 609 + EXPORT_SYMBOL(pci_dma_sync_single_for_device); 621 610 622 611 /* Make physical memory consistent for a set of streaming 623 612 * mode DMA translations after a transfer. ··· 641 628 } 642 629 } 643 630 } 631 + EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu); 644 632 645 633 void pci_dma_sync_sg_for_device(struct pci_dev *hwdev, struct scatterlist *sgl, int nents, int direction) 646 634 { ··· 658 644 } 659 645 } 660 646 } 647 + EXPORT_SYMBOL(pci_dma_sync_sg_for_device); 661 648 #endif /* CONFIG_PCI */ 662 649 663 650 #ifdef CONFIG_PROC_FS
+1
arch/sparc/kernel/irq_32.c
··· 294 294 while (sparc_irq[cpu_irq].flags & SPARC_IRQ_INPROGRESS) 295 295 cpu_relax(); 296 296 } 297 + EXPORT_SYMBOL(synchronize_irq); 297 298 #endif /* SMP */ 298 299 299 300 void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs)
+6
arch/sparc/kernel/pcic.c
··· 956 956 /* addr += 1; */ 957 957 } 958 958 } 959 + EXPORT_SYMBOL(outsb); 959 960 960 961 void outsw(unsigned long addr, const void *src, unsigned long count) 961 962 { ··· 967 966 /* addr += 2; */ 968 967 } 969 968 } 969 + EXPORT_SYMBOL(outsw); 970 970 971 971 void outsl(unsigned long addr, const void *src, unsigned long count) 972 972 { ··· 978 976 /* addr += 4; */ 979 977 } 980 978 } 979 + EXPORT_SYMBOL(outsl); 981 980 982 981 void insb(unsigned long addr, void *dst, unsigned long count) 983 982 { ··· 989 986 /* addr += 1; */ 990 987 } 991 988 } 989 + EXPORT_SYMBOL(insb); 992 990 993 991 void insw(unsigned long addr, void *dst, unsigned long count) 994 992 { ··· 1000 996 /* addr += 2; */ 1001 997 } 1002 998 } 999 + EXPORT_SYMBOL(insw); 1003 1000 1004 1001 void insl(unsigned long addr, void *dst, unsigned long count) 1005 1002 { ··· 1014 1009 /* addr += 4; */ 1015 1010 } 1016 1011 } 1012 + EXPORT_SYMBOL(insl); 1017 1013 1018 1014 subsys_initcall(pcic_init);
+2
arch/sparc/kernel/process_32.c
··· 44 44 * Set in pm platform drivers (apc.c and pmc.c) 45 45 */ 46 46 void (*pm_idle)(void); 47 + EXPORT_SYMBOL(pm_idle); 47 48 48 49 /* 49 50 * Power-off handler instantiation for pm.h compliance ··· 674 673 "g1", "g2", "g3", "o0", "o1", "memory", "cc"); 675 674 return retval; 676 675 } 676 + EXPORT_SYMBOL(kernel_thread); 677 677 678 678 unsigned long get_wchan(struct task_struct *task) 679 679 {
+3
arch/sparc/kernel/setup_32.c
··· 199 199 extern int root_mountflags; 200 200 201 201 char reboot_command[COMMAND_LINE_SIZE]; 202 + 202 203 enum sparc_cpu sparc_cpu_model; 204 + EXPORT_SYMBOL(sparc_cpu_model); 203 205 204 206 struct tt_entry *sparc_ttable; 205 207 ··· 393 391 394 392 prom_cmdline(); 395 393 } 394 + EXPORT_SYMBOL(sun_do_break); 396 395 397 396 int stop_a_enabled = 1; 398 397
+9 -128
arch/sparc/kernel/sparc_ksyms_32.c
··· 9 9 10 10 #include <linux/module.h> 11 11 #include <linux/init.h> 12 - #include <linux/smp.h> 13 - #include <linux/types.h> 14 - #include <linux/sched.h> 15 - #include <linux/interrupt.h> 16 - #include <linux/in6.h> 17 - #include <linux/spinlock.h> 18 - #include <linux/mm.h> 19 - #include <linux/syscalls.h> 20 - #ifdef CONFIG_PCI 21 - #include <linux/pci.h> 22 - #endif 23 - #include <linux/pm.h> 24 - #ifdef CONFIG_HIGHMEM 25 - #include <linux/highmem.h> 26 - #endif 27 12 28 - #include <asm/oplib.h> 29 - #include <asm/delay.h> 30 - #include <asm/system.h> 31 - #include <asm/auxio.h> 32 13 #include <asm/pgtable.h> 33 - #include <asm/io.h> 34 - #include <asm/irq.h> 35 - #include <asm/idprom.h> 36 - #include <asm/head.h> 37 - #include <asm/smp.h> 38 - #include <asm/ptrace.h> 39 14 #include <asm/uaccess.h> 40 - #include <asm/checksum.h> 41 - #ifdef CONFIG_SBUS 15 + #include <asm/delay.h> 16 + #include <asm/head.h> 42 17 #include <asm/dma.h> 43 - #endif 44 - #include <asm/io-unit.h> 45 - #include <asm/bug.h> 46 - 47 - extern spinlock_t rtc_lock; 48 18 49 19 struct poll { 50 20 int fd; ··· 22 52 short revents; 23 53 }; 24 54 25 - /* used by various drivers */ 26 - EXPORT_SYMBOL(sparc_cpu_model); 27 - EXPORT_SYMBOL(kernel_thread); 28 - 29 - EXPORT_SYMBOL(sparc_valid_addr_bitmap); 30 - EXPORT_SYMBOL(phys_base); 31 - EXPORT_SYMBOL(pfn_base); 32 - 33 - /* Per-CPU information table */ 34 - EXPORT_PER_CPU_SYMBOL(__cpu_data); 35 - 36 - #ifdef CONFIG_SMP 37 - /* IRQ implementation. */ 38 - EXPORT_SYMBOL(synchronize_irq); 39 - #endif 40 - 55 + /* from entry.S */ 41 56 EXPORT_SYMBOL(__udelay); 42 57 EXPORT_SYMBOL(__ndelay); 43 - EXPORT_SYMBOL(rtc_lock); 44 - EXPORT_SYMBOL(set_auxio); 45 - EXPORT_SYMBOL(get_auxio); 46 - EXPORT_SYMBOL(io_remap_pfn_range); 47 58 59 + /* from head_32.S */ 60 + EXPORT_SYMBOL(__ret_efault); 61 + EXPORT_SYMBOL(empty_zero_page); 62 + 63 + /* Defined using magic */ 48 64 #ifndef CONFIG_SMP 49 65 EXPORT_SYMBOL(BTFIXUP_CALL(___xchg32)); 50 66 #else ··· 42 86 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_one)); 43 87 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_sgl)); 44 88 EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_one)); 45 - 46 89 EXPORT_SYMBOL(BTFIXUP_CALL(pgprot_noncached)); 47 90 48 - #ifdef CONFIG_SBUS 49 - EXPORT_SYMBOL(sbus_set_sbus64); 50 - #endif 51 - #ifdef CONFIG_PCI 52 - EXPORT_SYMBOL(insb); 53 - EXPORT_SYMBOL(outsb); 54 - EXPORT_SYMBOL(insw); 55 - EXPORT_SYMBOL(outsw); 56 - EXPORT_SYMBOL(insl); 57 - EXPORT_SYMBOL(outsl); 58 - EXPORT_SYMBOL(pci_alloc_consistent); 59 - EXPORT_SYMBOL(pci_free_consistent); 60 - EXPORT_SYMBOL(pci_map_single); 61 - EXPORT_SYMBOL(pci_unmap_single); 62 - EXPORT_SYMBOL(pci_dma_sync_single_for_cpu); 63 - EXPORT_SYMBOL(pci_dma_sync_single_for_device); 64 - EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu); 65 - EXPORT_SYMBOL(pci_dma_sync_sg_for_device); 66 - EXPORT_SYMBOL(pci_map_sg); 67 - EXPORT_SYMBOL(pci_unmap_sg); 68 - EXPORT_SYMBOL(pci_map_page); 69 - EXPORT_SYMBOL(pci_unmap_page); 70 - /* Actually, ioremap/iounmap are not PCI specific. But it is ok for drivers. */ 71 - EXPORT_SYMBOL(ioremap); 72 - EXPORT_SYMBOL(iounmap); 73 - #endif 74 - 75 - /* in arch/sparc/mm/highmem.c */ 76 - #ifdef CONFIG_HIGHMEM 77 - EXPORT_SYMBOL(kmap_atomic); 78 - EXPORT_SYMBOL(kunmap_atomic); 79 - #endif 80 - 81 - /* prom symbols */ 82 - EXPORT_SYMBOL(idprom); 83 - EXPORT_SYMBOL(prom_root_node); 84 - EXPORT_SYMBOL(prom_getchild); 85 - EXPORT_SYMBOL(prom_getsibling); 86 - EXPORT_SYMBOL(prom_searchsiblings); 87 - EXPORT_SYMBOL(prom_firstprop); 88 - EXPORT_SYMBOL(prom_nextprop); 89 - EXPORT_SYMBOL(prom_getproplen); 90 - EXPORT_SYMBOL(prom_getproperty); 91 - EXPORT_SYMBOL(prom_node_has_property); 92 - EXPORT_SYMBOL(prom_setprop); 91 + /* Exporting a symbol from /init/main.c */ 93 92 EXPORT_SYMBOL(saved_command_line); 94 - EXPORT_SYMBOL(prom_apply_obio_ranges); 95 - EXPORT_SYMBOL(prom_feval); 96 - EXPORT_SYMBOL(prom_getbool); 97 - EXPORT_SYMBOL(prom_getstring); 98 - EXPORT_SYMBOL(prom_getint); 99 - EXPORT_SYMBOL(prom_getintdefault); 100 - EXPORT_SYMBOL(prom_finddevice); 101 - EXPORT_SYMBOL(romvec); 102 - EXPORT_SYMBOL(__prom_getchild); 103 - EXPORT_SYMBOL(__prom_getsibling); 104 - 105 - /* sparc library symbols */ 106 - EXPORT_SYMBOL(page_kernel); 107 - 108 - /* Cache flushing. */ 109 - EXPORT_SYMBOL(sparc_flush_page_to_ram); 110 - 111 - /* For when serial stuff is built as modules. */ 112 - EXPORT_SYMBOL(sun_do_break); 113 - 114 - EXPORT_SYMBOL(__ret_efault); 115 - 116 - #ifdef CONFIG_DEBUG_BUGVERBOSE 117 - EXPORT_SYMBOL(do_BUG); 118 - #endif 119 - 120 - /* Sun Power Management Idle Handler */ 121 - EXPORT_SYMBOL(pm_idle); 122 - 123 - EXPORT_SYMBOL(empty_zero_page);
-5
arch/sparc/kernel/sparc_ksyms_64.c
··· 29 29 #include <asm/pgtable.h> 30 30 #include <asm/io.h> 31 31 #include <asm/irq.h> 32 - #include <asm/idprom.h> 33 32 #include <asm/elf.h> 34 33 #include <asm/head.h> 35 34 #include <asm/smp.h> ··· 65 66 extern int __ashrdi3(int, int); 66 67 67 68 extern int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs); 68 - 69 - /* Per-CPU information table */ 70 - EXPORT_PER_CPU_SYMBOL(__cpu_data); 71 69 72 70 /* used by various drivers */ 73 71 #ifdef CONFIG_SMP ··· 130 134 EXPORT_SYMBOL(kernel_thread); 131 135 132 136 /* prom symbols */ 133 - EXPORT_SYMBOL(idprom); 134 137 EXPORT_SYMBOL(prom_root_node); 135 138 EXPORT_SYMBOL(prom_getchild); 136 139 EXPORT_SYMBOL(prom_getsibling);
+2
arch/sparc/kernel/time_32.c
··· 48 48 #include "irq.h" 49 49 50 50 DEFINE_SPINLOCK(rtc_lock); 51 + EXPORT_SYMBOL(rtc_lock); 52 + 51 53 static int set_rtc_mmss(unsigned long); 52 54 static int sbus_do_settimeofday(struct timespec *tv); 53 55
+1
arch/sparc/kernel/traps_32.c
··· 424 424 // bust_spinlocks(1); XXX Not in our original BUG() 425 425 printk("kernel BUG at %s:%d!\n", file, line); 426 426 } 427 + EXPORT_SYMBOL(do_BUG); 427 428 #endif 428 429 429 430 /* Since we have our mappings set up, on multiprocessors we can spin them
+1
arch/sparc/mm/generic_32.c
··· 95 95 flush_tlb_range(vma, beg, end); 96 96 return error; 97 97 } 98 + EXPORT_SYMBOL(io_remap_pfn_range);
+2
arch/sparc/mm/highmem.c
··· 62 62 63 63 return (void*) vaddr; 64 64 } 65 + EXPORT_SYMBOL(kmap_atomic); 65 66 66 67 void kunmap_atomic(void *kvaddr, enum km_type type) 67 68 { ··· 99 98 100 99 pagefault_enable(); 101 100 } 101 + EXPORT_SYMBOL(kunmap_atomic); 102 102 103 103 /* We may be fed a pagetable here by ptep_to_xxx and others. */ 104 104 struct page *kmap_atomic_to_page(void *ptr)
+6
arch/sparc/mm/init_32.c
··· 38 38 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 39 39 40 40 unsigned long *sparc_valid_addr_bitmap; 41 + EXPORT_SYMBOL(sparc_valid_addr_bitmap); 41 42 42 43 unsigned long phys_base; 44 + EXPORT_SYMBOL(phys_base); 45 + 43 46 unsigned long pfn_base; 47 + EXPORT_SYMBOL(pfn_base); 44 48 45 49 unsigned long page_kernel; 50 + EXPORT_SYMBOL(page_kernel); 46 51 47 52 struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS+1]; 48 53 unsigned long sparc_unmapped_base; ··· 527 522 if (vaddr) 528 523 __flush_page_to_ram(vaddr); 529 524 } 525 + EXPORT_SYMBOL(sparc_flush_page_to_ram);
+4
arch/sparc/prom/init_32.c
··· 8 8 9 9 #include <linux/kernel.h> 10 10 #include <linux/init.h> 11 + #include <linux/module.h> 11 12 12 13 #include <asm/openprom.h> 13 14 #include <asm/oplib.h> 14 15 15 16 struct linux_romvec *romvec; 17 + EXPORT_SYMBOL(romvec); 18 + 16 19 enum prom_major_version prom_vers; 17 20 unsigned int prom_rev, prom_prev; 18 21 19 22 /* The root node of the prom device tree. */ 20 23 int prom_root_node; 24 + EXPORT_SYMBOL(prom_root_node); 21 25 22 26 /* Pointer to the device tree operations structure. */ 23 27 struct linux_nodeops *prom_nodeops;
+3
arch/sparc/prom/misc_32.c
··· 8 8 #include <linux/types.h> 9 9 #include <linux/kernel.h> 10 10 #include <linux/sched.h> 11 + #include <linux/module.h> 12 + 11 13 #include <asm/openprom.h> 12 14 #include <asm/oplib.h> 13 15 #include <asm/auxio.h> ··· 46 44 restore_current(); 47 45 spin_unlock_irqrestore(&prom_lock, flags); 48 46 } 47 + EXPORT_SYMBOL(prom_feval); 49 48 50 49 /* Drop into the prom, with the chance to continue with the 'go' 51 50 * prom command.
+3
arch/sparc/prom/ranges.c
··· 6 6 */ 7 7 8 8 #include <linux/init.h> 9 + #include <linux/module.h> 10 + 9 11 #include <asm/openprom.h> 10 12 #include <asm/oplib.h> 11 13 #include <asm/types.h> ··· 64 62 if(num_obio_ranges) 65 63 prom_adjust_regs(regs, nregs, promlib_obio_ranges, num_obio_ranges); 66 64 } 65 + EXPORT_SYMBOL(prom_apply_obio_ranges); 67 66 68 67 void __init prom_ranges_init(void) 69 68 {
+17
arch/sparc/prom/tree_32.c
··· 12 12 #include <linux/kernel.h> 13 13 #include <linux/sched.h> 14 14 #include <linux/ctype.h> 15 + #include <linux/module.h> 15 16 16 17 #include <asm/openprom.h> 17 18 #include <asm/oplib.h> ··· 34 33 35 34 return cnode; 36 35 } 36 + EXPORT_SYMBOL(__prom_getchild); 37 37 38 38 /* Return the child of node 'node' or zero if no this node has no 39 39 * direct descendent. ··· 52 50 53 51 return cnode; 54 52 } 53 + EXPORT_SYMBOL(prom_getchild); 55 54 56 55 /* Internal version of prom_getsibling that does not alter return values. */ 57 56 int __prom_getsibling(int node) ··· 67 64 68 65 return cnode; 69 66 } 67 + EXPORT_SYMBOL(__prom_getsibling); 70 68 71 69 /* Return the next sibling of node 'node' or zero if no more siblings 72 70 * at this level of depth in the tree. ··· 85 81 86 82 return sibnode; 87 83 } 84 + EXPORT_SYMBOL(prom_getsibling); 88 85 89 86 /* Return the length in bytes of property 'prop' at node 'node'. 90 87 * Return -1 on error. ··· 104 99 spin_unlock_irqrestore(&prom_lock, flags); 105 100 return ret; 106 101 } 102 + EXPORT_SYMBOL(prom_getproplen); 107 103 108 104 /* Acquire a property 'prop' at node 'node' and place it in 109 105 * 'buffer' which has a size of 'bufsize'. If the acquisition ··· 125 119 spin_unlock_irqrestore(&prom_lock, flags); 126 120 return ret; 127 121 } 122 + EXPORT_SYMBOL(prom_getproperty); 128 123 129 124 /* Acquire an integer property and return its value. Returns -1 130 125 * on failure. ··· 139 132 140 133 return -1; 141 134 } 135 + EXPORT_SYMBOL(prom_getint); 142 136 143 137 /* Acquire an integer property, upon error return the passed default 144 138 * integer. ··· 153 145 154 146 return retval; 155 147 } 148 + EXPORT_SYMBOL(prom_getintdefault); 156 149 157 150 /* Acquire a boolean property, 1=TRUE 0=FALSE. */ 158 151 int prom_getbool(int node, char *prop) ··· 164 155 if(retval == -1) return 0; 165 156 return 1; 166 157 } 158 + EXPORT_SYMBOL(prom_getbool); 167 159 168 160 /* Acquire a property whose value is a string, returns a null 169 161 * string on error. The char pointer is the user supplied string ··· 179 169 user_buf[0] = 0; 180 170 return; 181 171 } 172 + EXPORT_SYMBOL(prom_getstring); 182 173 183 174 184 175 /* Does the device at node 'node' have name 'name'? ··· 215 204 216 205 return 0; 217 206 } 207 + EXPORT_SYMBOL(prom_searchsiblings); 218 208 219 209 /* Interal version of nextprop that does not alter return values. */ 220 210 char * __prom_nextprop(int node, char * oprop) ··· 240 228 241 229 return __prom_nextprop(node, ""); 242 230 } 231 + EXPORT_SYMBOL(prom_firstprop); 243 232 244 233 /* Return the property type string after property type 'oprop' 245 234 * at node 'node' . Returns empty string if no more ··· 253 240 254 241 return __prom_nextprop(node, oprop); 255 242 } 243 + EXPORT_SYMBOL(prom_nextprop); 256 244 257 245 int prom_finddevice(char *name) 258 246 { ··· 301 287 } 302 288 return node; 303 289 } 290 + EXPORT_SYMBOL(prom_finddevice); 304 291 305 292 int prom_node_has_property(int node, char *prop) 306 293 { ··· 314 299 } while (*current_property); 315 300 return 0; 316 301 } 302 + EXPORT_SYMBOL(prom_node_has_property); 317 303 318 304 /* Set property 'pname' at node 'node' to value 'value' which has a length 319 305 * of 'size' bytes. Return the number of bytes the prom accepted. ··· 332 316 spin_unlock_irqrestore(&prom_lock, flags); 333 317 return ret; 334 318 } 319 + EXPORT_SYMBOL(prom_setprop); 335 320 336 321 int prom_inst2pkg(int inst) 337 322 {