aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/pnpbios
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2008-02-06 04:40:03 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-06 13:41:19 -0500
commit2bb9a6b32f98873adf89a0de04c898681a2c5b8e (patch)
tree1205b9a0873e55db0f8fdff59943f2f9f3782647 /drivers/pnp/pnpbios
parentcc8259a6666de456460bacdd5637f5e2d71790ea (diff)
pnp: declare PNP option parsing functions as __init
There are three kind of parse functions provided by PNP acpi/bios: - get current resources - set resources - get possible resources The first two may be needed later at runtime. The possible resource settings should never change dynamically. And even if this would make any sense (I doubt it), the current implementation only parses possible resource settings at early init time: -> declare all the option parsing __init [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Thomas Renninger <trenn@suse.de> Acked-By: Rene Herman <rene.herman@gmail.com> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pnp/pnpbios')
-rw-r--r--drivers/pnp/pnpbios/core.c2
-rw-r--r--drivers/pnp/pnpbios/rsparser.c33
2 files changed, 18 insertions, 17 deletions
diff --git a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c
index e33e03f71084..f7e67197a568 100644
--- a/drivers/pnp/pnpbios/core.c
+++ b/drivers/pnp/pnpbios/core.c
@@ -315,7 +315,7 @@ struct pnp_protocol pnpbios_protocol = {
315 .disable = pnpbios_disable_resources, 315 .disable = pnpbios_disable_resources,
316}; 316};
317 317
318static int insert_device(struct pnp_bios_node *node) 318static int __init insert_device(struct pnp_bios_node *node)
319{ 319{
320 struct list_head *pos; 320 struct list_head *pos;
321 struct pnp_dev *dev; 321 struct pnp_dev *dev;
diff --git a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c
index 3fabf11b0027..caade3531416 100644
--- a/drivers/pnp/pnpbios/rsparser.c
+++ b/drivers/pnp/pnpbios/rsparser.c
@@ -262,8 +262,8 @@ len_err:
262 * Resource Configuration Options 262 * Resource Configuration Options
263 */ 263 */
264 264
265static void pnpbios_parse_mem_option(unsigned char *p, int size, 265static __init void pnpbios_parse_mem_option(unsigned char *p, int size,
266 struct pnp_option *option) 266 struct pnp_option *option)
267{ 267{
268 struct pnp_mem *mem; 268 struct pnp_mem *mem;
269 269
@@ -278,8 +278,8 @@ static void pnpbios_parse_mem_option(unsigned char *p, int size,
278 pnp_register_mem_resource(option, mem); 278 pnp_register_mem_resource(option, mem);
279} 279}
280 280
281static void pnpbios_parse_mem32_option(unsigned char *p, int size, 281static __init void pnpbios_parse_mem32_option(unsigned char *p, int size,
282 struct pnp_option *option) 282 struct pnp_option *option)
283{ 283{
284 struct pnp_mem *mem; 284 struct pnp_mem *mem;
285 285
@@ -294,8 +294,8 @@ static void pnpbios_parse_mem32_option(unsigned char *p, int size,
294 pnp_register_mem_resource(option, mem); 294 pnp_register_mem_resource(option, mem);
295} 295}
296 296
297static void pnpbios_parse_fixed_mem32_option(unsigned char *p, int size, 297static __init void pnpbios_parse_fixed_mem32_option(unsigned char *p, int size,
298 struct pnp_option *option) 298 struct pnp_option *option)
299{ 299{
300 struct pnp_mem *mem; 300 struct pnp_mem *mem;
301 301
@@ -309,7 +309,7 @@ static void pnpbios_parse_fixed_mem32_option(unsigned char *p, int size,
309 pnp_register_mem_resource(option, mem); 309 pnp_register_mem_resource(option, mem);
310} 310}
311 311
312static void pnpbios_parse_irq_option(unsigned char *p, int size, 312static __init void pnpbios_parse_irq_option(unsigned char *p, int size,
313 struct pnp_option *option) 313 struct pnp_option *option)
314{ 314{
315 struct pnp_irq *irq; 315 struct pnp_irq *irq;
@@ -327,7 +327,7 @@ static void pnpbios_parse_irq_option(unsigned char *p, int size,
327 pnp_register_irq_resource(option, irq); 327 pnp_register_irq_resource(option, irq);
328} 328}
329 329
330static void pnpbios_parse_dma_option(unsigned char *p, int size, 330static __init void pnpbios_parse_dma_option(unsigned char *p, int size,
331 struct pnp_option *option) 331 struct pnp_option *option)
332{ 332{
333 struct pnp_dma *dma; 333 struct pnp_dma *dma;
@@ -340,8 +340,8 @@ static void pnpbios_parse_dma_option(unsigned char *p, int size,
340 pnp_register_dma_resource(option, dma); 340 pnp_register_dma_resource(option, dma);
341} 341}
342 342
343static void pnpbios_parse_port_option(unsigned char *p, int size, 343static __init void pnpbios_parse_port_option(unsigned char *p, int size,
344 struct pnp_option *option) 344 struct pnp_option *option)
345{ 345{
346 struct pnp_port *port; 346 struct pnp_port *port;
347 347
@@ -356,8 +356,8 @@ static void pnpbios_parse_port_option(unsigned char *p, int size,
356 pnp_register_port_resource(option, port); 356 pnp_register_port_resource(option, port);
357} 357}
358 358
359static void pnpbios_parse_fixed_port_option(unsigned char *p, int size, 359static __init void pnpbios_parse_fixed_port_option(unsigned char *p, int size,
360 struct pnp_option *option) 360 struct pnp_option *option)
361{ 361{
362 struct pnp_port *port; 362 struct pnp_port *port;
363 363
@@ -371,9 +371,9 @@ static void pnpbios_parse_fixed_port_option(unsigned char *p, int size,
371 pnp_register_port_resource(option, port); 371 pnp_register_port_resource(option, port);
372} 372}
373 373
374static unsigned char *pnpbios_parse_resource_option_data(unsigned char *p, 374static __init unsigned char *
375 unsigned char *end, 375pnpbios_parse_resource_option_data(unsigned char *p, unsigned char *end,
376 struct pnp_dev *dev) 376 struct pnp_dev *dev)
377{ 377{
378 unsigned int len, tag; 378 unsigned int len, tag;
379 int priority = 0; 379 int priority = 0;
@@ -781,7 +781,8 @@ len_err:
781 * Core Parsing Functions 781 * Core Parsing Functions
782 */ 782 */
783 783
784int pnpbios_parse_data_stream(struct pnp_dev *dev, struct pnp_bios_node *node) 784int __init pnpbios_parse_data_stream(struct pnp_dev *dev,
785 struct pnp_bios_node *node)
785{ 786{
786 unsigned char *p = (char *)node->data; 787 unsigned char *p = (char *)node->data;
787 unsigned char *end = (char *)(node->data + node->size); 788 unsigned char *end = (char *)(node->data + node->size);