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/tree_32.c | |
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/tree_32.c')
-rw-r--r-- | arch/sparc/prom/tree_32.c | 17 |
1 files changed, 17 insertions, 0 deletions
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 | { |