aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pnp/core.c')
-rw-r--r--drivers/pnp/core.c29
1 files changed, 3 insertions, 26 deletions
diff --git a/drivers/pnp/core.c b/drivers/pnp/core.c
index 1dfdc325211d..61066fdb9e6d 100644
--- a/drivers/pnp/core.c
+++ b/drivers/pnp/core.c
@@ -2,7 +2,6 @@
2 * core.c - contains all core device and protocol registration functions 2 * core.c - contains all core device and protocol registration functions
3 * 3 *
4 * Copyright 2002 Adam Belay <ambx1@neo.rr.com> 4 * Copyright 2002 Adam Belay <ambx1@neo.rr.com>
5 *
6 */ 5 */
7 6
8#include <linux/pnp.h> 7#include <linux/pnp.h>
@@ -48,7 +47,6 @@ void *pnp_alloc(long size)
48 * 47 *
49 * Ex protocols: ISAPNP, PNPBIOS, etc 48 * Ex protocols: ISAPNP, PNPBIOS, etc
50 */ 49 */
51
52int pnp_register_protocol(struct pnp_protocol *protocol) 50int pnp_register_protocol(struct pnp_protocol *protocol)
53{ 51{
54 int nodenum; 52 int nodenum;
@@ -82,7 +80,6 @@ int pnp_register_protocol(struct pnp_protocol *protocol)
82/** 80/**
83 * pnp_protocol_unregister - removes a pnp protocol from the pnp layer 81 * pnp_protocol_unregister - removes a pnp protocol from the pnp layer
84 * @protocol: pointer to the corresponding pnp_protocol structure 82 * @protocol: pointer to the corresponding pnp_protocol structure
85 *
86 */ 83 */
87void pnp_unregister_protocol(struct pnp_protocol *protocol) 84void pnp_unregister_protocol(struct pnp_protocol *protocol)
88{ 85{
@@ -96,6 +93,7 @@ static void pnp_free_ids(struct pnp_dev *dev)
96{ 93{
97 struct pnp_id *id; 94 struct pnp_id *id;
98 struct pnp_id *next; 95 struct pnp_id *next;
96
99 if (!dev) 97 if (!dev)
100 return; 98 return;
101 id = dev->id; 99 id = dev->id;
@@ -109,6 +107,7 @@ static void pnp_free_ids(struct pnp_dev *dev)
109static void pnp_release_device(struct device *dmdev) 107static void pnp_release_device(struct device *dmdev)
110{ 108{
111 struct pnp_dev *dev = to_pnp_dev(dmdev); 109 struct pnp_dev *dev = to_pnp_dev(dmdev);
110
112 pnp_free_option(dev->independent); 111 pnp_free_option(dev->independent);
113 pnp_free_option(dev->dependent); 112 pnp_free_option(dev->dependent);
114 pnp_free_ids(dev); 113 pnp_free_ids(dev);
@@ -118,6 +117,7 @@ static void pnp_release_device(struct device *dmdev)
118int __pnp_add_device(struct pnp_dev *dev) 117int __pnp_add_device(struct pnp_dev *dev)
119{ 118{
120 int ret; 119 int ret;
120
121 pnp_fixup_device(dev); 121 pnp_fixup_device(dev);
122 dev->dev.bus = &pnp_bus_type; 122 dev->dev.bus = &pnp_bus_type;
123 dev->dev.dma_mask = &dev->dma_mask; 123 dev->dev.dma_mask = &dev->dma_mask;
@@ -141,7 +141,6 @@ int __pnp_add_device(struct pnp_dev *dev)
141 * 141 *
142 * adds to driver model, name database, fixups, interface, etc. 142 * adds to driver model, name database, fixups, interface, etc.
143 */ 143 */
144
145int pnp_add_device(struct pnp_dev *dev) 144int pnp_add_device(struct pnp_dev *dev)
146{ 145{
147 if (!dev || !dev->protocol || dev->card) 146 if (!dev || !dev->protocol || dev->card)
@@ -161,21 +160,6 @@ void __pnp_remove_device(struct pnp_dev *dev)
161 device_unregister(&dev->dev); 160 device_unregister(&dev->dev);
162} 161}
163 162
164/**
165 * pnp_remove_device - removes a pnp device from the pnp layer
166 * @dev: pointer to dev to add
167 *
168 * this function will free all mem used by dev
169 */
170#if 0
171void pnp_remove_device(struct pnp_dev *dev)
172{
173 if (!dev || dev->card)
174 return;
175 __pnp_remove_device(dev);
176}
177#endif /* 0 */
178
179static int __init pnp_init(void) 163static int __init pnp_init(void)
180{ 164{
181 printk(KERN_INFO "Linux Plug and Play Support v0.97 (c) Adam Belay\n"); 165 printk(KERN_INFO "Linux Plug and Play Support v0.97 (c) Adam Belay\n");
@@ -183,10 +167,3 @@ static int __init pnp_init(void)
183} 167}
184 168
185subsys_initcall(pnp_init); 169subsys_initcall(pnp_init);
186
187#if 0
188EXPORT_SYMBOL(pnp_register_protocol);
189EXPORT_SYMBOL(pnp_unregister_protocol);
190EXPORT_SYMBOL(pnp_add_device);
191EXPORT_SYMBOL(pnp_remove_device);
192#endif /* 0 */