]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/atm/atm_sysfs.c
Driver core: change add_uevent_var to use a struct
[linux-2.6-omap-h63xx.git] / net / atm / atm_sysfs.c
index f094a0879c16ddedcb386c6ca749a23f6c32fe9c..9ef07eda2c437be45c4fbba4a984c2ca04d929c9 100644 (file)
@@ -105,10 +105,9 @@ static struct class_device_attribute *atm_attrs[] = {
        NULL
 };
 
-static int atm_uevent(struct class_device *cdev, char **envp, int num_envp, char *buf, int size)
+static int atm_uevent(struct class_device *cdev, struct kobj_uevent_env *env)
 {
        struct atm_dev *adev;
-       int i = 0, len = 0;
 
        if (!cdev)
                return -ENODEV;
@@ -117,11 +116,9 @@ static int atm_uevent(struct class_device *cdev, char **envp, int num_envp, char
        if (!adev)
                return -ENODEV;
 
-       if (add_uevent_var(envp, num_envp, &i, buf, size, &len,
-                          "NAME=%s%d", adev->type, adev->number))
+       if (add_uevent_var(env, "NAME=%s%d", adev->type, adev->number))
                return -ENOMEM;
 
-       envp[i] = NULL;
        return 0;
 }