Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95603
b: refs/heads/master
c: 16dc42e
h: refs/heads/master
i:
  95601: 43980bc
  95599: 636641a
v: v3
  • Loading branch information
Stas Sergeev authored and Greg Kroah-Hartman committed Apr 30, 2008
1 parent d864f31 commit 837809e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 93dd40013f4f7f4b18d19d0d77855f025bcc57c3
refs/heads/master: 16dc42e018c2868211b4928f20a957c0c216126c
10 changes: 10 additions & 0 deletions trunk/drivers/base/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,22 @@ static void driver_remove_groups(struct device_driver *drv,
int driver_register(struct device_driver *drv)
{
int ret;
struct device_driver *other;

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);

other = driver_find(drv->name, drv->bus);
if (other) {
put_driver(other);
printk(KERN_ERR "Error: Driver '%s' is already registered, "
"aborting...\n", drv->name);
return -EEXIST;
}

ret = bus_add_driver(drv);
if (ret)
return ret;
Expand Down

0 comments on commit 837809e

Please sign in to comment.