summaryrefslogtreecommitdiffstats
path: root/drivers/base/core.c
diff options
context:
space:
mode:
author <jgarzik@pretzel.yyz.us>2005-05-27 22:07:40 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-05-27 22:07:40 -0400
commitff0e0ea2f5d36fa90fc2c57fd019102b0a0cfabf (patch)
tree963cdd52a4032cd4827896c4e813cfbf6dd7b3e6 /drivers/base/core.c
parent43f66a6ce8da299344cf1bc2ac2311889cc88555 (diff)
parent1f15d694522af9cd7492695f11dd2dc77b6cf098 (diff)
downloadkernel-crypto-ff0e0ea2f5d36fa90fc2c57fd019102b0a0cfabf.tar.gz
kernel-crypto-ff0e0ea2f5d36fa90fc2c57fd019102b0a0cfabf.tar.xz
kernel-crypto-ff0e0ea2f5d36fa90fc2c57fd019102b0a0cfabf.zip
Automatic merge of /spare/repo/netdev-2.6 branch we18
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r--drivers/base/core.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 268a9c8d168..fbc223486f8 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)