diff options
| -rw-r--r-- | drivers/base/dd.c | 4 | ||||
| -rw-r--r-- | include/linux/device.h | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 503c2620bbcc..da57ee9d63fe 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c | |||
| @@ -51,6 +51,10 @@ static int driver_sysfs_add(struct device *dev) | |||
| 51 | { | 51 | { |
| 52 | int ret; | 52 | int ret; |
| 53 | 53 | ||
| 54 | if (dev->bus) | ||
| 55 | blocking_notifier_call_chain(&dev->bus->p->bus_notifier, | ||
| 56 | BUS_NOTIFY_BIND_DRIVER, dev); | ||
| 57 | |||
| 54 | ret = sysfs_create_link(&dev->driver->p->kobj, &dev->kobj, | 58 | ret = sysfs_create_link(&dev->driver->p->kobj, &dev->kobj, |
| 55 | kobject_name(&dev->kobj)); | 59 | kobject_name(&dev->kobj)); |
| 56 | if (ret == 0) { | 60 | if (ret == 0) { |
diff --git a/include/linux/device.h b/include/linux/device.h index ddffdf7da393..0ca24e93304f 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -109,10 +109,12 @@ extern int bus_unregister_notifier(struct bus_type *bus, | |||
| 109 | */ | 109 | */ |
| 110 | #define BUS_NOTIFY_ADD_DEVICE 0x00000001 /* device added */ | 110 | #define BUS_NOTIFY_ADD_DEVICE 0x00000001 /* device added */ |
| 111 | #define BUS_NOTIFY_DEL_DEVICE 0x00000002 /* device removed */ | 111 | #define BUS_NOTIFY_DEL_DEVICE 0x00000002 /* device removed */ |
| 112 | #define BUS_NOTIFY_BOUND_DRIVER 0x00000003 /* driver bound to device */ | 112 | #define BUS_NOTIFY_BIND_DRIVER 0x00000003 /* driver about to be |
| 113 | #define BUS_NOTIFY_UNBIND_DRIVER 0x00000004 /* driver about to be | 113 | bound */ |
| 114 | #define BUS_NOTIFY_BOUND_DRIVER 0x00000004 /* driver bound to device */ | ||
| 115 | #define BUS_NOTIFY_UNBIND_DRIVER 0x00000005 /* driver about to be | ||
| 114 | unbound */ | 116 | unbound */ |
| 115 | #define BUS_NOTIFY_UNBOUND_DRIVER 0x00000005 /* driver is unbound | 117 | #define BUS_NOTIFY_UNBOUND_DRIVER 0x00000006 /* driver is unbound |
| 116 | from the device */ | 118 | from the device */ |
| 117 | 119 | ||
| 118 | extern struct kset *bus_get_kset(struct bus_type *bus); | 120 | extern struct kset *bus_get_kset(struct bus_type *bus); |
