Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.16 /drivers/base/driver.c

Filename:/drivers/base/driver.c
Lines Added:5
Lines Deleted:0
Also changed in: (Previous) 2.6.16-rc6  2.6.16-rc5  2.6.16-rc4  2.6.16-rc3  2.6.16-rc2  2.6.16-rc1 
(Following) 2.6.17-git18  2.6.17-git19  2.6.17-git20  2.6.17-git21  2.6.17-git22  2.6.17-git23 

Location
[  2.6.16
  [  drivers
    [  base
       o  driver.c

Patch

diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index 161f3a3..b400314 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -171,6 +171,11 @@ static void klist_devices_put(struct kli
  */
 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);


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.