aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/core.c
diff options
context:
space:
mode:
authorDrew Moseley <dmoseley@mvista.com>2008-09-27 19:31:35 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-10-16 12:24:51 -0400
commit8a89efd18aa15bb832778baa4e6eee3857ecada4 (patch)
tree91b4fe321aecd787d995543bc49e894a3c123628 /drivers/pnp/core.c
parent3ce24d8d93f8f9617841d0c8416174da7ee1b042 (diff)
PNP: create device attributes via default device attributes
This creates the attributes before the uevent is sent. Signed-off-by: Drew Moseley <dmoseley@mvista.com> Acked-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pnp/core.c')
-rw-r--r--drivers/pnp/core.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/pnp/core.c b/drivers/pnp/core.c
index a411582bcd72..7d65da821229 100644
--- a/drivers/pnp/core.c
+++ b/drivers/pnp/core.c
@@ -159,21 +159,13 @@ struct pnp_dev *pnp_alloc_dev(struct pnp_protocol *protocol, int id, char *pnpid
159 159
160int __pnp_add_device(struct pnp_dev *dev) 160int __pnp_add_device(struct pnp_dev *dev)
161{ 161{
162 int ret;
163
164 pnp_fixup_device(dev); 162 pnp_fixup_device(dev);
165 dev->status = PNP_READY; 163 dev->status = PNP_READY;
166 spin_lock(&pnp_lock); 164 spin_lock(&pnp_lock);
167 list_add_tail(&dev->global_list, &pnp_global); 165 list_add_tail(&dev->global_list, &pnp_global);
168 list_add_tail(&dev->protocol_list, &dev->protocol->devices); 166 list_add_tail(&dev->protocol_list, &dev->protocol->devices);
169 spin_unlock(&pnp_lock); 167 spin_unlock(&pnp_lock);
170 168 return device_register(&dev->dev);
171 ret = device_register(&dev->dev);
172 if (ret)
173 return ret;
174
175 pnp_interface_attach_device(dev);
176 return 0;
177} 169}
178 170
179/* 171/*