]> err.no Git - linux-2.6/blobdiff - drivers/base/sys.c
Merge branch 'x86/s2ram-fix' into x86/urgent
[linux-2.6] / drivers / base / sys.c
index 1a06c2393719e9022a57be10118b31421a1f0211..358bb0be3c0838b9233bae7b1eab1cc2b05ef1e6 100644 (file)
@@ -175,8 +175,7 @@ int sysdev_driver_register(struct sysdev_class *cls, struct sysdev_driver *drv)
        }
 
        /* Check whether this driver has already been added to a class. */
-       if ((drv->entry.next != drv->entry.prev) ||
-           (drv->entry.next != NULL)) {
+       if (drv->entry.next && !list_empty(&drv->entry)) {
                printk(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);
@@ -195,7 +194,7 @@ int sysdev_driver_register(struct sysdev_class *cls, struct sysdev_driver *drv)
                }
        } else {
                err = -EINVAL;
-               printk(KERN_ERR "%s: invalid device class\n", __FUNCTION__);
+               printk(KERN_ERR "%s: invalid device class\n", __func__);
                WARN_ON(1);
        }
        mutex_unlock(&sysdev_drivers_lock);