diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-11-01 22:41:16 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:33 -0500 |
commit | c6f7e72a3f4641095ade9ded287d910c980c6148 (patch) | |
tree | d2d7d946b978ce9f5586a02c3520aa76e928a551 /drivers/base/core.c | |
parent | b249072ee6897fe4f8d461c7bb4b926223263c28 (diff) |
driver core: remove fields from struct bus_type
struct bus_type is static everywhere in the kernel. This moves the
kobject in the structure out of it, and a bunch of other private only to
the driver core fields are now moved to a private structure. This lets
us dynamically create the backing kobject properly and gives us the
chance to be able to document to users exactly how to use the struct
bus_type as there are no fields they can improperly access.
Thanks to Kay for the build fixes on this patch.
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r-- | drivers/base/core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index beb351600675..414a480e10a3 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -769,7 +769,7 @@ int device_add(struct device *dev) | |||
769 | 769 | ||
770 | /* notify clients of device entry (new way) */ | 770 | /* notify clients of device entry (new way) */ |
771 | if (dev->bus) | 771 | if (dev->bus) |
772 | blocking_notifier_call_chain(&dev->bus->bus_notifier, | 772 | blocking_notifier_call_chain(&dev->bus->p->bus_notifier, |
773 | BUS_NOTIFY_ADD_DEVICE, dev); | 773 | BUS_NOTIFY_ADD_DEVICE, dev); |
774 | 774 | ||
775 | error = device_create_file(dev, &uevent_attr); | 775 | error = device_create_file(dev, &uevent_attr); |
@@ -820,7 +820,7 @@ int device_add(struct device *dev) | |||
820 | dpm_sysfs_remove(dev); | 820 | dpm_sysfs_remove(dev); |
821 | PMError: | 821 | PMError: |
822 | if (dev->bus) | 822 | if (dev->bus) |
823 | blocking_notifier_call_chain(&dev->bus->bus_notifier, | 823 | blocking_notifier_call_chain(&dev->bus->p->bus_notifier, |
824 | BUS_NOTIFY_DEL_DEVICE, dev); | 824 | BUS_NOTIFY_DEL_DEVICE, dev); |
825 | device_remove_attrs(dev); | 825 | device_remove_attrs(dev); |
826 | AttrsError: | 826 | AttrsError: |
@@ -999,7 +999,7 @@ void device_del(struct device * dev) | |||
999 | if (platform_notify_remove) | 999 | if (platform_notify_remove) |
1000 | platform_notify_remove(dev); | 1000 | platform_notify_remove(dev); |
1001 | if (dev->bus) | 1001 | if (dev->bus) |
1002 | blocking_notifier_call_chain(&dev->bus->bus_notifier, | 1002 | blocking_notifier_call_chain(&dev->bus->p->bus_notifier, |
1003 | BUS_NOTIFY_DEL_DEVICE, dev); | 1003 | BUS_NOTIFY_DEL_DEVICE, dev); |
1004 | kobject_uevent(&dev->kobj, KOBJ_REMOVE); | 1004 | kobject_uevent(&dev->kobj, KOBJ_REMOVE); |
1005 | kobject_del(&dev->kobj); | 1005 | kobject_del(&dev->kobj); |