diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2009-01-08 19:58:05 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-08 19:58:05 -0500 |
commit | 6943f3da3e64edd95ee2d33abc0a642357746ba6 (patch) | |
tree | 156201055ba46d9bea791aa0cf34903756647e5d /arch/sparc/prom | |
parent | 45536ffc8dcb7798ff4818f54391547e5af19648 (diff) |
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>
Diffstat (limited to 'arch/sparc/prom')
-rw-r--r-- | arch/sparc/prom/init_32.c | 4 | ||||
-rw-r--r-- | arch/sparc/prom/misc_32.c | 3 | ||||
-rw-r--r-- | arch/sparc/prom/ranges.c | 3 | ||||
-rw-r--r-- | arch/sparc/prom/tree_32.c | 17 |
4 files changed, 27 insertions, 0 deletions
diff --git a/arch/sparc/prom/init_32.c b/arch/sparc/prom/init_32.c index 873217c6d823..6193c33ed4d4 100644 --- a/arch/sparc/prom/init_32.c +++ b/arch/sparc/prom/init_32.c | |||
@@ -8,16 +8,20 @@ | |||
8 | 8 | ||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/module.h> | ||
11 | 12 | ||
12 | #include <asm/openprom.h> | 13 | #include <asm/openprom.h> |
13 | #include <asm/oplib.h> | 14 | #include <asm/oplib.h> |
14 | 15 | ||
15 | struct linux_romvec *romvec; | 16 | struct linux_romvec *romvec; |
17 | EXPORT_SYMBOL(romvec); | ||
18 | |||
16 | enum prom_major_version prom_vers; | 19 | enum prom_major_version prom_vers; |
17 | unsigned int prom_rev, prom_prev; | 20 | unsigned int prom_rev, prom_prev; |
18 | 21 | ||
19 | /* The root node of the prom device tree. */ | 22 | /* The root node of the prom device tree. */ |
20 | int prom_root_node; | 23 | int prom_root_node; |
24 | EXPORT_SYMBOL(prom_root_node); | ||
21 | 25 | ||
22 | /* Pointer to the device tree operations structure. */ | 26 | /* Pointer to the device tree operations structure. */ |
23 | struct linux_nodeops *prom_nodeops; | 27 | struct linux_nodeops *prom_nodeops; |
diff --git a/arch/sparc/prom/misc_32.c b/arch/sparc/prom/misc_32.c index cf6c3f6d36c3..4d61c540bb3d 100644 --- a/arch/sparc/prom/misc_32.c +++ b/arch/sparc/prom/misc_32.c | |||
@@ -8,6 +8,8 @@ | |||
8 | #include <linux/types.h> | 8 | #include <linux/types.h> |
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/module.h> | ||
12 | |||
11 | #include <asm/openprom.h> | 13 | #include <asm/openprom.h> |
12 | #include <asm/oplib.h> | 14 | #include <asm/oplib.h> |
13 | #include <asm/auxio.h> | 15 | #include <asm/auxio.h> |
@@ -44,6 +46,7 @@ prom_feval(char *fstring) | |||
44 | restore_current(); | 46 | restore_current(); |
45 | spin_unlock_irqrestore(&prom_lock, flags); | 47 | spin_unlock_irqrestore(&prom_lock, flags); |
46 | } | 48 | } |
49 | EXPORT_SYMBOL(prom_feval); | ||
47 | 50 | ||
48 | /* Drop into the prom, with the chance to continue with the 'go' | 51 | /* Drop into the prom, with the chance to continue with the 'go' |
49 | * prom command. | 52 | * prom command. |
diff --git a/arch/sparc/prom/ranges.c b/arch/sparc/prom/ranges.c index 64579a376419..cd5790853ff6 100644 --- a/arch/sparc/prom/ranges.c +++ b/arch/sparc/prom/ranges.c | |||
@@ -6,6 +6,8 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
9 | #include <linux/module.h> | ||
10 | |||
9 | #include <asm/openprom.h> | 11 | #include <asm/openprom.h> |
10 | #include <asm/oplib.h> | 12 | #include <asm/oplib.h> |
11 | #include <asm/types.h> | 13 | #include <asm/types.h> |
@@ -62,6 +64,7 @@ prom_apply_obio_ranges(struct linux_prom_registers *regs, int nregs) | |||
62 | if(num_obio_ranges) | 64 | if(num_obio_ranges) |
63 | prom_adjust_regs(regs, nregs, promlib_obio_ranges, num_obio_ranges); | 65 | prom_adjust_regs(regs, nregs, promlib_obio_ranges, num_obio_ranges); |
64 | } | 66 | } |
67 | EXPORT_SYMBOL(prom_apply_obio_ranges); | ||
65 | 68 | ||
66 | void __init prom_ranges_init(void) | 69 | void __init prom_ranges_init(void) |
67 | { | 70 | { |
diff --git a/arch/sparc/prom/tree_32.c b/arch/sparc/prom/tree_32.c index 6d8187357331..9d9965cd8bca 100644 --- a/arch/sparc/prom/tree_32.c +++ b/arch/sparc/prom/tree_32.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/ctype.h> | 14 | #include <linux/ctype.h> |
15 | #include <linux/module.h> | ||
15 | 16 | ||
16 | #include <asm/openprom.h> | 17 | #include <asm/openprom.h> |
17 | #include <asm/oplib.h> | 18 | #include <asm/oplib.h> |
@@ -33,6 +34,7 @@ int __prom_getchild(int node) | |||
33 | 34 | ||
34 | return cnode; | 35 | return cnode; |
35 | } | 36 | } |
37 | EXPORT_SYMBOL(__prom_getchild); | ||
36 | 38 | ||
37 | /* Return the child of node 'node' or zero if no this node has no | 39 | /* Return the child of node 'node' or zero if no this node has no |
38 | * direct descendent. | 40 | * direct descendent. |
@@ -50,6 +52,7 @@ int prom_getchild(int node) | |||
50 | 52 | ||
51 | return cnode; | 53 | return cnode; |
52 | } | 54 | } |
55 | EXPORT_SYMBOL(prom_getchild); | ||
53 | 56 | ||
54 | /* Internal version of prom_getsibling that does not alter return values. */ | 57 | /* Internal version of prom_getsibling that does not alter return values. */ |
55 | int __prom_getsibling(int node) | 58 | int __prom_getsibling(int node) |
@@ -64,6 +67,7 @@ int __prom_getsibling(int node) | |||
64 | 67 | ||
65 | return cnode; | 68 | return cnode; |
66 | } | 69 | } |
70 | EXPORT_SYMBOL(__prom_getsibling); | ||
67 | 71 | ||
68 | /* Return the next sibling of node 'node' or zero if no more siblings | 72 | /* Return the next sibling of node 'node' or zero if no more siblings |
69 | * at this level of depth in the tree. | 73 | * at this level of depth in the tree. |
@@ -81,6 +85,7 @@ int prom_getsibling(int node) | |||
81 | 85 | ||
82 | return sibnode; | 86 | return sibnode; |
83 | } | 87 | } |
88 | EXPORT_SYMBOL(prom_getsibling); | ||
84 | 89 | ||
85 | /* Return the length in bytes of property 'prop' at node 'node'. | 90 | /* Return the length in bytes of property 'prop' at node 'node'. |
86 | * Return -1 on error. | 91 | * Return -1 on error. |
@@ -99,6 +104,7 @@ int prom_getproplen(int node, const char *prop) | |||
99 | spin_unlock_irqrestore(&prom_lock, flags); | 104 | spin_unlock_irqrestore(&prom_lock, flags); |
100 | return ret; | 105 | return ret; |
101 | } | 106 | } |
107 | EXPORT_SYMBOL(prom_getproplen); | ||
102 | 108 | ||
103 | /* Acquire a property 'prop' at node 'node' and place it in | 109 | /* Acquire a property 'prop' at node 'node' and place it in |
104 | * 'buffer' which has a size of 'bufsize'. If the acquisition | 110 | * 'buffer' which has a size of 'bufsize'. If the acquisition |
@@ -119,6 +125,7 @@ int prom_getproperty(int node, const char *prop, char *buffer, int bufsize) | |||
119 | spin_unlock_irqrestore(&prom_lock, flags); | 125 | spin_unlock_irqrestore(&prom_lock, flags); |
120 | return ret; | 126 | return ret; |
121 | } | 127 | } |
128 | EXPORT_SYMBOL(prom_getproperty); | ||
122 | 129 | ||
123 | /* Acquire an integer property and return its value. Returns -1 | 130 | /* Acquire an integer property and return its value. Returns -1 |
124 | * on failure. | 131 | * on failure. |
@@ -132,6 +139,7 @@ int prom_getint(int node, char *prop) | |||
132 | 139 | ||
133 | return -1; | 140 | return -1; |
134 | } | 141 | } |
142 | EXPORT_SYMBOL(prom_getint); | ||
135 | 143 | ||
136 | /* Acquire an integer property, upon error return the passed default | 144 | /* Acquire an integer property, upon error return the passed default |
137 | * integer. | 145 | * integer. |
@@ -145,6 +153,7 @@ int prom_getintdefault(int node, char *property, int deflt) | |||
145 | 153 | ||
146 | return retval; | 154 | return retval; |
147 | } | 155 | } |
156 | EXPORT_SYMBOL(prom_getintdefault); | ||
148 | 157 | ||
149 | /* Acquire a boolean property, 1=TRUE 0=FALSE. */ | 158 | /* Acquire a boolean property, 1=TRUE 0=FALSE. */ |
150 | int prom_getbool(int node, char *prop) | 159 | int prom_getbool(int node, char *prop) |
@@ -155,6 +164,7 @@ int prom_getbool(int node, char *prop) | |||
155 | if(retval == -1) return 0; | 164 | if(retval == -1) return 0; |
156 | return 1; | 165 | return 1; |
157 | } | 166 | } |
167 | EXPORT_SYMBOL(prom_getbool); | ||
158 | 168 | ||
159 | /* Acquire a property whose value is a string, returns a null | 169 | /* Acquire a property whose value is a string, returns a null |
160 | * string on error. The char pointer is the user supplied string | 170 | * string on error. The char pointer is the user supplied string |
@@ -169,6 +179,7 @@ void prom_getstring(int node, char *prop, char *user_buf, int ubuf_size) | |||
169 | user_buf[0] = 0; | 179 | user_buf[0] = 0; |
170 | return; | 180 | return; |
171 | } | 181 | } |
182 | EXPORT_SYMBOL(prom_getstring); | ||
172 | 183 | ||
173 | 184 | ||
174 | /* Does the device at node 'node' have name 'name'? | 185 | /* Does the device at node 'node' have name 'name'? |
@@ -204,6 +215,7 @@ int prom_searchsiblings(int node_start, char *nodename) | |||
204 | 215 | ||
205 | return 0; | 216 | return 0; |
206 | } | 217 | } |
218 | EXPORT_SYMBOL(prom_searchsiblings); | ||
207 | 219 | ||
208 | /* Interal version of nextprop that does not alter return values. */ | 220 | /* Interal version of nextprop that does not alter return values. */ |
209 | char * __prom_nextprop(int node, char * oprop) | 221 | char * __prom_nextprop(int node, char * oprop) |
@@ -228,6 +240,7 @@ char * prom_firstprop(int node, char *bufer) | |||
228 | 240 | ||
229 | return __prom_nextprop(node, ""); | 241 | return __prom_nextprop(node, ""); |
230 | } | 242 | } |
243 | EXPORT_SYMBOL(prom_firstprop); | ||
231 | 244 | ||
232 | /* Return the property type string after property type 'oprop' | 245 | /* Return the property type string after property type 'oprop' |
233 | * at node 'node' . Returns empty string if no more | 246 | * at node 'node' . Returns empty string if no more |
@@ -240,6 +253,7 @@ char * prom_nextprop(int node, char *oprop, char *buffer) | |||
240 | 253 | ||
241 | return __prom_nextprop(node, oprop); | 254 | return __prom_nextprop(node, oprop); |
242 | } | 255 | } |
256 | EXPORT_SYMBOL(prom_nextprop); | ||
243 | 257 | ||
244 | int prom_finddevice(char *name) | 258 | int prom_finddevice(char *name) |
245 | { | 259 | { |
@@ -287,6 +301,7 @@ int prom_finddevice(char *name) | |||
287 | } | 301 | } |
288 | return node; | 302 | return node; |
289 | } | 303 | } |
304 | EXPORT_SYMBOL(prom_finddevice); | ||
290 | 305 | ||
291 | int prom_node_has_property(int node, char *prop) | 306 | int prom_node_has_property(int node, char *prop) |
292 | { | 307 | { |
@@ -299,6 +314,7 @@ int prom_node_has_property(int node, char *prop) | |||
299 | } while (*current_property); | 314 | } while (*current_property); |
300 | return 0; | 315 | return 0; |
301 | } | 316 | } |
317 | EXPORT_SYMBOL(prom_node_has_property); | ||
302 | 318 | ||
303 | /* Set property 'pname' at node 'node' to value 'value' which has a length | 319 | /* Set property 'pname' at node 'node' to value 'value' which has a length |
304 | * of 'size' bytes. Return the number of bytes the prom accepted. | 320 | * of 'size' bytes. Return the number of bytes the prom accepted. |
@@ -316,6 +332,7 @@ int prom_setprop(int node, const char *pname, char *value, int size) | |||
316 | spin_unlock_irqrestore(&prom_lock, flags); | 332 | spin_unlock_irqrestore(&prom_lock, flags); |
317 | return ret; | 333 | return ret; |
318 | } | 334 | } |
335 | EXPORT_SYMBOL(prom_setprop); | ||
319 | 336 | ||
320 | int prom_inst2pkg(int inst) | 337 | int prom_inst2pkg(int inst) |
321 | { | 338 | { |