diff options
author | <jgarzik@pretzel.yyz.us> | 2005-05-26 05:47:10 (GMT) |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-05-26 05:47:10 (GMT) |
commit | 949d33e70f2c3e93bfe5265a50e40175b1ab1ec1 (patch) | |
tree | ca88fd8f8f81b167dc4685ed34e9636f267db60d /drivers/base/core.c | |
parent | b095518ef51c37658c58367bd19240b8a113f25c (diff) | |
parent | bef9c558841604116704e10b3d9ff3dbf4939423 (diff) | |
download | linux-fsl-qoriq-949d33e70f2c3e93bfe5265a50e40175b1ab1ec1.tar.xz |
Automatic merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git branch HEAD
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r-- | drivers/base/core.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 268a9c8..fbc2234 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -31,8 +31,6 @@ int (*platform_notify_remove)(struct device * dev) = NULL; #define to_dev(obj) container_of(obj, struct device, kobj) #define to_dev_attr(_attr) container_of(_attr, struct device_attribute, attr) -extern struct attribute * dev_default_attrs[]; - static ssize_t dev_attr_show(struct kobject * kobj, struct attribute * attr, char * buf) { @@ -89,7 +87,6 @@ static void device_release(struct kobject * kobj) static struct kobj_type ktype_device = { .release = device_release, .sysfs_ops = &dev_sysfs_ops, - .default_attrs = dev_default_attrs, }; @@ -248,6 +245,7 @@ int device_add(struct device *dev) if ((error = kobject_add(&dev->kobj))) goto Error; + kobject_hotplug(&dev->kobj, KOBJ_ADD); if ((error = device_pm_add(dev))) goto PMError; if ((error = bus_add_device(dev))) @@ -260,14 +258,13 @@ int device_add(struct device *dev) /* notify platform of device entry */ if (platform_notify) platform_notify(dev); - - kobject_hotplug(&dev->kobj, KOBJ_ADD); Done: put_device(dev); return error; BusError: device_pm_remove(dev); PMError: + kobject_hotplug(&dev->kobj, KOBJ_REMOVE); kobject_del(&dev->kobj); Error: if (parent) |