Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106200
b: refs/heads/master
c: f810a5c
h: refs/heads/master
v: v3
  • Loading branch information
Arjan van de Ven authored and Linus Torvalds committed Jul 26, 2008
1 parent b5cc95a commit 636a67f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 12e0036818eed243c8ed6583ebf98261a2554e12
refs/heads/master: f810a5cf28a818db96333cd23646f0227ec015b4
6 changes: 2 additions & 4 deletions trunk/drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,10 @@ static void device_release(struct kobject *kobj)
dev->type->release(dev);
else if (dev->class && dev->class->dev_release)
dev->class->dev_release(dev);
else {
printk(KERN_ERR "Device '%s' does not have a release() "
else
WARN(1, KERN_ERR "Device '%s' does not have a release() "
"function, it is broken and must be fixed.\n",
dev->bus_id);
WARN_ON(1);
}
}

static struct kobj_type device_ktype = {
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/base/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,8 @@ memory_block_action(struct memory_block *mem, unsigned long action)
}
break;
default:
printk(KERN_WARNING "%s(%p, %ld) unknown action: %ld\n",
WARN(1, KERN_WARNING "%s(%p, %ld) unknown action: %ld\n",
__func__, mem, action, action);
WARN_ON(1);
ret = -EINVAL;
}

Expand Down
12 changes: 4 additions & 8 deletions trunk/drivers/base/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,19 +168,16 @@ int sysdev_driver_register(struct sysdev_class *cls, struct sysdev_driver *drv)
int err = 0;

if (!cls) {
printk(KERN_WARNING "sysdev: invalid class passed to "
WARN(1, KERN_WARNING "sysdev: invalid class passed to "
"sysdev_driver_register!\n");
WARN_ON(1);
return -EINVAL;
}

/* Check whether this driver has already been added to a class. */
if (drv->entry.next && !list_empty(&drv->entry)) {
printk(KERN_WARNING "sysdev: class %s: driver (%p) has already"
if (drv->entry.next && !list_empty(&drv->entry))
WARN(1, KERN_WARNING "sysdev: class %s: driver (%p) has already"
" been registered to a class, something is wrong, but "
"will forge on!\n", cls->name, drv);
WARN_ON(1);
}

mutex_lock(&sysdev_drivers_lock);
if (cls && kset_get(&cls->kset)) {
Expand All @@ -194,8 +191,7 @@ int sysdev_driver_register(struct sysdev_class *cls, struct sysdev_driver *drv)
}
} else {
err = -EINVAL;
printk(KERN_ERR "%s: invalid device class\n", __func__);
WARN_ON(1);
WARN(1, KERN_ERR "%s: invalid device class\n", __func__);
}
mutex_unlock(&sysdev_drivers_lock);
return err;
Expand Down

0 comments on commit 636a67f

Please sign in to comment.