diff options
author | Adrian Bunk <bunk@stusta.de> | 2005-11-07 04:01:48 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:54:09 -0500 |
commit | b449f63c8ce4a517cb91f237cc3d68d083ec2dd3 (patch) | |
tree | 3d00143e3114f5f044c174df519378bc47dcd4ea /drivers/pnp/pnpacpi | |
parent | 5fed0578be842dd7d24e5240a75b02bbc748501f (diff) |
[PATCH] drivers/pnp/: cleanups
This patch contains the following possible cleanups:
- make needlessly global code static
- #if 0 the following unused global function:
- core.c: pnp_remove_device
- #if 0 the following unneeded EXPORT_SYMBOL's:
- card.c: pnp_add_card
- card.c: pnp_remove_card
- card.c: pnp_add_card_device
- card.c: pnp_remove_card_device
- card.c: pnp_add_card_id
- core.c: pnp_register_protocol
- core.c: pnp_unregister_protocol
- core.c: pnp_add_device
- core.c: pnp_remove_device
- pnpacpi/core.c: pnpacpi_protocol
- driver.c: pnp_add_id
- isapnp/core.c: isapnp_read_byte
- manager.c: pnp_auto_config_dev
- resource.c: pnp_register_dependent_option
- resource.c: pnp_register_independent_option
- resource.c: pnp_register_irq_resource
- resource.c: pnp_register_dma_resource
- resource.c: pnp_register_port_resource
- resource.c: pnp_register_mem_resource
Note that this patch #if 0's exactly one functions and removes no
functions. Most it does is the #if 0 of EXPORT_SYMBOL's, so if any modular
code will use any of them, re-adding will be trivial.
Modular ISAPnP might be interesting in some cases, but this is more legacy
code. If someone would work on it to sort all the issues out (starting
with the point that most users of __ISAPNP__ will have to be fixed)
re-enabling the required EXPORT_SYMBOL's won't be hard for him.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Adam Belay <ambx1@neo.rr.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/pnp/pnpacpi')
-rw-r--r-- | drivers/pnp/pnpacpi/core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index 1a8915e74160..816479ad217b 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c | |||
@@ -117,7 +117,7 @@ static int pnpacpi_disable_resources(struct pnp_dev *dev) | |||
117 | return ACPI_FAILURE(status) ? -ENODEV : 0; | 117 | return ACPI_FAILURE(status) ? -ENODEV : 0; |
118 | } | 118 | } |
119 | 119 | ||
120 | struct pnp_protocol pnpacpi_protocol = { | 120 | static struct pnp_protocol pnpacpi_protocol = { |
121 | .name = "Plug and Play ACPI", | 121 | .name = "Plug and Play ACPI", |
122 | .get = pnpacpi_get_resources, | 122 | .get = pnpacpi_get_resources, |
123 | .set = pnpacpi_set_resources, | 123 | .set = pnpacpi_set_resources, |
@@ -234,7 +234,7 @@ static acpi_status __init pnpacpi_add_device_handler(acpi_handle handle, | |||
234 | } | 234 | } |
235 | 235 | ||
236 | int pnpacpi_disabled __initdata; | 236 | int pnpacpi_disabled __initdata; |
237 | int __init pnpacpi_init(void) | 237 | static int __init pnpacpi_init(void) |
238 | { | 238 | { |
239 | if (acpi_disabled || pnpacpi_disabled) { | 239 | if (acpi_disabled || pnpacpi_disabled) { |
240 | pnp_info("PnP ACPI: disabled"); | 240 | pnp_info("PnP ACPI: disabled"); |
@@ -258,4 +258,6 @@ static int __init pnpacpi_setup(char *str) | |||
258 | } | 258 | } |
259 | __setup("pnpacpi=", pnpacpi_setup); | 259 | __setup("pnpacpi=", pnpacpi_setup); |
260 | 260 | ||
261 | #if 0 | ||
261 | EXPORT_SYMBOL(pnpacpi_protocol); | 262 | EXPORT_SYMBOL(pnpacpi_protocol); |
263 | #endif | ||