From a0deb20b520d4865ebcc21d04bb33b28f4977d70 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Fri, 23 Jul 2010 19:56:18 +0900 Subject: [PATCH] --- yaml --- r: 205532 b: refs/heads/master c: 45daef0fdcc44f6af86fdebc4fc7eb7c79375398 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/base/dd.c | 4 ++++ trunk/include/linux/device.h | 8 +++++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 36d33d58ac5b..efaa1cd9b516 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 600c20f34f645adf7884277302b10601583aa7d5 +refs/heads/master: 45daef0fdcc44f6af86fdebc4fc7eb7c79375398 diff --git a/trunk/drivers/base/dd.c b/trunk/drivers/base/dd.c index 503c2620bbcc..da57ee9d63fe 100644 --- a/trunk/drivers/base/dd.c +++ b/trunk/drivers/base/dd.c @@ -51,6 +51,10 @@ static int driver_sysfs_add(struct device *dev) { int ret; + if (dev->bus) + blocking_notifier_call_chain(&dev->bus->p->bus_notifier, + BUS_NOTIFY_BIND_DRIVER, dev); + ret = sysfs_create_link(&dev->driver->p->kobj, &dev->kobj, kobject_name(&dev->kobj)); if (ret == 0) { diff --git a/trunk/include/linux/device.h b/trunk/include/linux/device.h index ddffdf7da393..0ca24e93304f 100644 --- a/trunk/include/linux/device.h +++ b/trunk/include/linux/device.h @@ -109,10 +109,12 @@ extern int bus_unregister_notifier(struct bus_type *bus, */ #define BUS_NOTIFY_ADD_DEVICE 0x00000001 /* device added */ #define BUS_NOTIFY_DEL_DEVICE 0x00000002 /* device removed */ -#define BUS_NOTIFY_BOUND_DRIVER 0x00000003 /* driver bound to device */ -#define BUS_NOTIFY_UNBIND_DRIVER 0x00000004 /* driver about to be +#define BUS_NOTIFY_BIND_DRIVER 0x00000003 /* driver about to be + bound */ +#define BUS_NOTIFY_BOUND_DRIVER 0x00000004 /* driver bound to device */ +#define BUS_NOTIFY_UNBIND_DRIVER 0x00000005 /* driver about to be unbound */ -#define BUS_NOTIFY_UNBOUND_DRIVER 0x00000005 /* driver is unbound +#define BUS_NOTIFY_UNBOUND_DRIVER 0x00000006 /* driver is unbound from the device */ extern struct kset *bus_get_kset(struct bus_type *bus);