aboutsummaryrefslogtreecommitdiff
path: root/drivers/pnp/core.c
diff options
context:
space:
mode:
authorDrew Moseley <dmoseley@mvista.com>2008-09-28 01:31:35 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2008-10-16 09:24:51 -0700
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 a411582bcd7..7d65da82122 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
int __pnp_add_device(struct pnp_dev *dev)
{
- int ret;
-
pnp_fixup_device(dev);
dev->status = PNP_READY;
spin_lock(&pnp_lock);
list_add_tail(&dev->global_list, &pnp_global);
list_add_tail(&dev->protocol_list, &dev->protocol->devices);
spin_unlock(&pnp_lock);
-
- ret = device_register(&dev->dev);
- if (ret)
- return ret;
-
- pnp_interface_attach_device(dev);
- return 0;
+ return device_register(&dev->dev);
}
/*