X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fbase%2Fdriver.c;h=b400314e1c62d46d9d2dc047cb76a08292b7f9ff;hb=d955d90b90db4b3ac2a3e56d271f372c41fb00d6;hp=161f3a390d90651973a8a738446b3b7330950a09;hpb=1ef43204f4bd24dcd3156185b19b31b6b4151ae9;p=linux-2.6 diff --git a/drivers/base/driver.c b/drivers/base/driver.c index 161f3a390d..b400314e1c 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c @@ -171,6 +171,11 @@ static void klist_devices_put(struct klist_node *n) */ int driver_register(struct device_driver * drv) { + if ((drv->bus->probe && drv->probe) || + (drv->bus->remove && drv->remove) || + (drv->bus->shutdown && drv->shutdown)) { + printk(KERN_WARNING "Driver '%s' needs updating - please use bus_type methods\n", drv->name); + } klist_init(&drv->klist_devices, klist_devices_get, klist_devices_put); init_completion(&drv->unloaded); return bus_add_driver(drv);