aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/prom/tree_64.c
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2009-01-08 19:58:20 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-08 19:58:20 -0500
commit917c3660d6d9a4b073a3db7c10f6989adae4e191 (patch)
tree3cf8a7f80852fb637b7affefad1c046d272a5043 /arch/sparc/prom/tree_64.c
parent6943f3da3e64edd95ee2d33abc0a642357746ba6 (diff)
sparc64: 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_64.c Comment all remaining EXPORT_SYMBOL()s in sparc_ksyms_64.c 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_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_64.c')
-rw-r--r--arch/sparc/prom/tree_64.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/arch/sparc/prom/tree_64.c b/arch/sparc/prom/tree_64.c
index 281aea44790b..175c709e39a9 100644
--- a/arch/sparc/prom/tree_64.c
+++ b/arch/sparc/prom/tree_64.c
@@ -10,6 +10,7 @@
10#include <linux/types.h> 10#include <linux/types.h>
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/sched.h> 12#include <linux/sched.h>
13#include <linux/module.h>
13 14
14#include <asm/openprom.h> 15#include <asm/openprom.h>
15#include <asm/oplib.h> 16#include <asm/oplib.h>
@@ -22,6 +23,7 @@ inline int __prom_getchild(int node)
22{ 23{
23 return p1275_cmd ("child", P1275_INOUT(1, 1), node); 24 return p1275_cmd ("child", P1275_INOUT(1, 1), node);
24} 25}
26EXPORT_SYMBOL(__prom_getchild);
25 27
26inline int prom_getchild(int node) 28inline int prom_getchild(int node)
27{ 29{
@@ -32,6 +34,7 @@ inline int prom_getchild(int node)
32 if(cnode == -1) return 0; 34 if(cnode == -1) return 0;
33 return (int)cnode; 35 return (int)cnode;
34} 36}
37EXPORT_SYMBOL(prom_getchild);
35 38
36inline int prom_getparent(int node) 39inline int prom_getparent(int node)
37{ 40{
@@ -50,6 +53,7 @@ inline int __prom_getsibling(int node)
50{ 53{
51 return p1275_cmd(prom_peer_name, P1275_INOUT(1, 1), node); 54 return p1275_cmd(prom_peer_name, P1275_INOUT(1, 1), node);
52} 55}
56EXPORT_SYMBOL(__prom_getsibling);
53 57
54inline int prom_getsibling(int node) 58inline int prom_getsibling(int node)
55{ 59{
@@ -63,6 +67,7 @@ inline int prom_getsibling(int node)
63 67
64 return sibnode; 68 return sibnode;
65} 69}
70EXPORT_SYMBOL(prom_getsibling);
66 71
67/* Return the length in bytes of property 'prop' at node 'node'. 72/* Return the length in bytes of property 'prop' at node 'node'.
68 * Return -1 on error. 73 * Return -1 on error.
@@ -75,6 +80,7 @@ inline int prom_getproplen(int node, const char *prop)
75 P1275_INOUT(2, 1), 80 P1275_INOUT(2, 1),
76 node, prop); 81 node, prop);
77} 82}
83EXPORT_SYMBOL(prom_getproplen);
78 84
79/* Acquire a property 'prop' at node 'node' and place it in 85/* Acquire a property 'prop' at node 'node' and place it in
80 * 'buffer' which has a size of 'bufsize'. If the acquisition 86 * 'buffer' which has a size of 'bufsize'. If the acquisition
@@ -97,6 +103,7 @@ inline int prom_getproperty(int node, const char *prop,
97 node, prop, buffer, P1275_SIZE(plen)); 103 node, prop, buffer, P1275_SIZE(plen));
98 } 104 }
99} 105}
106EXPORT_SYMBOL(prom_getproperty);
100 107
101/* Acquire an integer property and return its value. Returns -1 108/* Acquire an integer property and return its value. Returns -1
102 * on failure. 109 * on failure.
@@ -110,6 +117,7 @@ inline int prom_getint(int node, const char *prop)
110 117
111 return -1; 118 return -1;
112} 119}
120EXPORT_SYMBOL(prom_getint);
113 121
114/* Acquire an integer property, upon error return the passed default 122/* Acquire an integer property, upon error return the passed default
115 * integer. 123 * integer.
@@ -124,6 +132,7 @@ int prom_getintdefault(int node, const char *property, int deflt)
124 132
125 return retval; 133 return retval;
126} 134}
135EXPORT_SYMBOL(prom_getintdefault);
127 136
128/* Acquire a boolean property, 1=TRUE 0=FALSE. */ 137/* Acquire a boolean property, 1=TRUE 0=FALSE. */
129int prom_getbool(int node, const char *prop) 138int prom_getbool(int node, const char *prop)
@@ -134,6 +143,7 @@ int prom_getbool(int node, const char *prop)
134 if(retval == -1) return 0; 143 if(retval == -1) return 0;
135 return 1; 144 return 1;
136} 145}
146EXPORT_SYMBOL(prom_getbool);
137 147
138/* Acquire a property whose value is a string, returns a null 148/* Acquire a property whose value is a string, returns a null
139 * string on error. The char pointer is the user supplied string 149 * string on error. The char pointer is the user supplied string
@@ -148,7 +158,7 @@ void prom_getstring(int node, const char *prop, char *user_buf, int ubuf_size)
148 user_buf[0] = 0; 158 user_buf[0] = 0;
149 return; 159 return;
150} 160}
151 161EXPORT_SYMBOL(prom_getstring);
152 162
153/* Does the device at node 'node' have name 'name'? 163/* Does the device at node 'node' have name 'name'?
154 * YES = 1 NO = 0 164 * YES = 1 NO = 0
@@ -181,6 +191,7 @@ int prom_searchsiblings(int node_start, const char *nodename)
181 191
182 return 0; 192 return 0;
183} 193}
194EXPORT_SYMBOL(prom_searchsiblings);
184 195
185/* Return the first property type for node 'node'. 196/* Return the first property type for node 'node'.
186 * buffer should be at least 32B in length 197 * buffer should be at least 32B in length
@@ -194,6 +205,7 @@ inline char *prom_firstprop(int node, char *buffer)
194 node, (char *) 0x0, buffer); 205 node, (char *) 0x0, buffer);
195 return buffer; 206 return buffer;
196} 207}
208EXPORT_SYMBOL(prom_firstprop);
197 209
198/* Return the property type string after property type 'oprop' 210/* Return the property type string after property type 'oprop'
199 * at node 'node' . Returns NULL string if no more 211 * at node 'node' . Returns NULL string if no more
@@ -217,6 +229,7 @@ inline char *prom_nextprop(int node, const char *oprop, char *buffer)
217 node, oprop, buffer); 229 node, oprop, buffer);
218 return buffer; 230 return buffer;
219} 231}
232EXPORT_SYMBOL(prom_nextprop);
220 233
221int 234int
222prom_finddevice(const char *name) 235prom_finddevice(const char *name)
@@ -228,6 +241,7 @@ prom_finddevice(const char *name)
228 P1275_INOUT(1, 1), 241 P1275_INOUT(1, 1),
229 name); 242 name);
230} 243}
244EXPORT_SYMBOL(prom_finddevice);
231 245
232int prom_node_has_property(int node, const char *prop) 246int prom_node_has_property(int node, const char *prop)
233{ 247{
@@ -241,7 +255,8 @@ int prom_node_has_property(int node, const char *prop)
241 } while (*buf); 255 } while (*buf);
242 return 0; 256 return 0;
243} 257}
244 258EXPORT_SYMBOL(prom_node_has_property);
259
245/* Set property 'pname' at node 'node' to value 'value' which has a length 260/* Set property 'pname' at node 'node' to value 'value' which has a length
246 * of 'size' bytes. Return the number of bytes the prom accepted. 261 * of 'size' bytes. Return the number of bytes the prom accepted.
247 */ 262 */
@@ -264,6 +279,7 @@ prom_setprop(int node, const char *pname, char *value, int size)
264 P1275_INOUT(4, 1), 279 P1275_INOUT(4, 1),
265 node, pname, value, P1275_SIZE(size)); 280 node, pname, value, P1275_SIZE(size));
266} 281}
282EXPORT_SYMBOL(prom_setprop);
267 283
268inline int prom_inst2pkg(int inst) 284inline int prom_inst2pkg(int inst)
269{ 285{