]> err.no Git - linux-2.6/blobdiff - drivers/base/class.c
char: rocket.c: fix sparse variable shadowing and int as NULL pointer
[linux-2.6] / drivers / base / class.c
index 59cf35894cfce832c814128baa495a2e35f4971b..b4901799308b00d2755e1536e477976a8302ff08 100644 (file)
@@ -149,7 +149,7 @@ int class_register(struct class *cls)
        if (error)
                return error;
 
-#ifdef CONFIG_SYSFS_DEPRECATED
+#if defined(CONFIG_SYSFS_DEPRECATED) && defined(CONFIG_BLOCK)
        /* let the block class directory show up in the root of sysfs */
        if (cls != &block_class)
                cls->subsys.kobj.kset = class_kset;
@@ -175,13 +175,13 @@ void class_unregister(struct class *cls)
 
 static void class_create_release(struct class *cls)
 {
-       pr_debug("%s called for %s\n", __FUNCTION__, cls->name);
+       pr_debug("%s called for %s\n", __func__, cls->name);
        kfree(cls);
 }
 
 static void class_device_create_release(struct class_device *class_dev)
 {
-       pr_debug("%s called for %s\n", __FUNCTION__, class_dev->class_id);
+       pr_debug("%s called for %s\n", __func__, class_dev->class_id);
        kfree(class_dev);
 }
 
@@ -189,7 +189,7 @@ static void class_device_create_release(struct class_device *class_dev)
 static int class_device_create_uevent(struct class_device *class_dev,
                                      struct kobj_uevent_env *env)
 {
-       pr_debug("%s called for %s\n", __FUNCTION__, class_dev->class_id);
+       pr_debug("%s called for %s\n", __func__, class_dev->class_id);
        return 0;
 }
 
@@ -415,7 +415,7 @@ static int class_uevent(struct kset *kset, struct kobject *kobj,
        struct device *dev = class_dev->dev;
        int retval = 0;
 
-       pr_debug("%s - name = %s\n", __FUNCTION__, class_dev->class_id);
+       pr_debug("%s - name = %s\n", __func__, class_dev->class_id);
 
        if (MAJOR(class_dev->devt)) {
                add_uevent_var(env, "MAJOR=%u", MAJOR(class_dev->devt));
@@ -863,7 +863,7 @@ EXPORT_SYMBOL_GPL(class_for_each_device);
  * The callback should return 0 if the device doesn't match and non-zero
  * if it does.  If the callback returns non-zero, this function will
  * return to the caller and not iterate over any more devices.
-
+ *
  * Note, you will need to drop the reference with put_device() after use.
  *
  * We hold class->sem in this function, so it can not be