]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/base/sys.c
driver core: drivers/base/sys.c: update comments
[linux-2.6-omap-h63xx.git] / drivers / base / sys.c
index 40fc14f035402ec70de718977e309932dce7b576..3ca9c5e8d765cd4426ea29422dbf8e47d2ae462b 100644 (file)
@@ -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)) {
@@ -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;
@@ -359,7 +355,7 @@ static void __sysdev_resume(struct sys_device *dev)
  *     sysdev_suspend - Suspend all system devices.
  *     @state:         Power state to enter.
  *
- *     We perform an almost identical operation as sys_device_shutdown()
+ *     We perform an almost identical operation as sysdev_shutdown()
  *     above, though calling ->suspend() instead. Interrupts are disabled
  *     when this called. Devices are responsible for both saving state and
  *     quiescing or powering down the device.
@@ -441,7 +437,7 @@ aux_driver:
 /**
  *     sysdev_resume - Bring system devices back to life.
  *
- *     Similar to sys_device_suspend(), but we iterate the list forwards
+ *     Similar to sysdev_suspend(), but we iterate the list forwards
  *     to guarantee that parent devices are resumed before their children.
  *
  *     Note: Interrupts are disabled when called.