]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/base/firmware_class.c
isdn: replace remaining __FUNCTION__ occurrences
[linux-2.6-omap-h63xx.git] / drivers / base / firmware_class.c
index b24efd4e3e3de2c1f681c68936c52eca839cd8ea..1fef7df8c9d601417312c088a6c0b8b9351646c8 100644 (file)
@@ -88,19 +88,14 @@ static CLASS_ATTR(timeout, 0644, firmware_timeout_show, firmware_timeout_store);
 
 static void fw_dev_release(struct device *dev);
 
-static int firmware_uevent(struct device *dev, char **envp, int num_envp,
-                          char *buffer, int buffer_size)
+static int firmware_uevent(struct device *dev, struct kobj_uevent_env *env)
 {
        struct firmware_priv *fw_priv = dev_get_drvdata(dev);
-       int i = 0, len = 0;
 
-       if (add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &len,
-                          "FIRMWARE=%s", fw_priv->fw_id))
+       if (add_uevent_var(env, "FIRMWARE=%s", fw_priv->fw_id))
                return -ENOMEM;
-       if (add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &len,
-                          "TIMEOUT=%i", loading_timeout))
+       if (add_uevent_var(env, "TIMEOUT=%i", loading_timeout))
                return -ENOMEM;
-       envp[i] = NULL;
 
        return 0;
 }
@@ -161,7 +156,7 @@ static ssize_t firmware_loading_store(struct device *dev,
                }
                /* fallthrough */
        default:
-               printk(KERN_ERR "%s: unexpected value (%d)\n", __FUNCTION__,
+               printk(KERN_ERR "%s: unexpected value (%d)\n", __func__,
                       loading);
                /* fallthrough */
        case -1:
@@ -214,7 +209,7 @@ fw_realloc_buffer(struct firmware_priv *fw_priv, int min_size)
        new_size = ALIGN(min_size, PAGE_SIZE);
        new_data = vmalloc(new_size);
        if (!new_data) {
-               printk(KERN_ERR "%s: unable to alloc buffer\n", __FUNCTION__);
+               printk(KERN_ERR "%s: unable to alloc buffer\n", __func__);
                /* Make sure that we don't keep incomplete data */
                fw_load_abort(fw_priv);
                return -ENOMEM;
@@ -312,7 +307,7 @@ static int fw_register_device(struct device **dev_p, const char *fw_name,
        *dev_p = NULL;
 
        if (!fw_priv || !f_dev) {
-               printk(KERN_ERR "%s: kmalloc failed\n", __FUNCTION__);
+               printk(KERN_ERR "%s: kmalloc failed\n", __func__);
                retval = -ENOMEM;
                goto error_kfree;
        }
@@ -333,7 +328,7 @@ static int fw_register_device(struct device **dev_p, const char *fw_name,
        retval = device_register(f_dev);
        if (retval) {
                printk(KERN_ERR "%s: device_register failed\n",
-                      __FUNCTION__);
+                      __func__);
                goto error_kfree;
        }
        *dev_p = f_dev;
@@ -367,14 +362,14 @@ static int fw_setup_device(struct firmware *fw, struct device **dev_p,
        retval = sysfs_create_bin_file(&f_dev->kobj, &fw_priv->attr_data);
        if (retval) {
                printk(KERN_ERR "%s: sysfs_create_bin_file failed\n",
-                      __FUNCTION__);
+                      __func__);
                goto error_unreg;
        }
 
        retval = device_create_file(f_dev, &dev_attr_loading);
        if (retval) {
                printk(KERN_ERR "%s: device_create_file failed\n",
-                      __FUNCTION__);
+                      __func__);
                goto error_unreg;
        }
 
@@ -404,7 +399,7 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
        *firmware_p = firmware = kzalloc(sizeof(*firmware), GFP_KERNEL);
        if (!firmware) {
                printk(KERN_ERR "%s: kmalloc(struct firmware) failed\n",
-                      __FUNCTION__);
+                      __func__);
                retval = -ENOMEM;
                goto out;
        }
@@ -575,13 +570,13 @@ firmware_class_init(void)
        int error;
        error = class_register(&firmware_class);
        if (error) {
-               printk(KERN_ERR "%s: class_register failed\n", __FUNCTION__);
+               printk(KERN_ERR "%s: class_register failed\n", __func__);
                return error;
        }
        error = class_create_file(&firmware_class, &class_attr_timeout);
        if (error) {
                printk(KERN_ERR "%s: class_create_file failed\n",
-                      __FUNCTION__);
+                      __func__);
                class_unregister(&firmware_class);
        }
        return error;