git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
driver-core: do not register a driver with bus_type not registered
[safe/jmp/linux-2.6]
/
drivers
/
base
/
driver.c
diff --git
a/drivers/base/driver.c
b/drivers/base/driver.c
index
1e2bda7
..
2889ad5
100644
(file)
--- a/
drivers/base/driver.c
+++ b/
drivers/base/driver.c
@@
-216,6
+216,8
@@
int driver_register(struct device_driver *drv)
int ret;
struct device_driver *other;
+ BUG_ON(!drv->bus->p);
+
if ((drv->bus->probe && drv->probe) ||
(drv->bus->remove && drv->remove) ||
(drv->bus->shutdown && drv->shutdown))