diff options
Diffstat (limited to 'net')
| -rw-r--r-- | net/atm/atm_sysfs.c | 7 | ||||
| -rw-r--r-- | net/bridge/br_sysfs_br.c | 2 | ||||
| -rw-r--r-- | net/core/net-sysfs.c | 14 | ||||
| -rw-r--r-- | net/wireless/sysfs.c | 3 |
4 files changed, 8 insertions, 18 deletions
diff --git a/net/atm/atm_sysfs.c b/net/atm/atm_sysfs.c index f094a0879c16..9ef07eda2c43 100644 --- a/net/atm/atm_sysfs.c +++ b/net/atm/atm_sysfs.c | |||
| @@ -105,10 +105,9 @@ static struct class_device_attribute *atm_attrs[] = { | |||
| 105 | NULL | 105 | NULL |
| 106 | }; | 106 | }; |
| 107 | 107 | ||
| 108 | static int atm_uevent(struct class_device *cdev, char **envp, int num_envp, char *buf, int size) | 108 | static int atm_uevent(struct class_device *cdev, struct kobj_uevent_env *env) |
| 109 | { | 109 | { |
| 110 | struct atm_dev *adev; | 110 | struct atm_dev *adev; |
| 111 | int i = 0, len = 0; | ||
| 112 | 111 | ||
| 113 | if (!cdev) | 112 | if (!cdev) |
| 114 | return -ENODEV; | 113 | return -ENODEV; |
| @@ -117,11 +116,9 @@ static int atm_uevent(struct class_device *cdev, char **envp, int num_envp, char | |||
| 117 | if (!adev) | 116 | if (!adev) |
| 118 | return -ENODEV; | 117 | return -ENODEV; |
| 119 | 118 | ||
| 120 | if (add_uevent_var(envp, num_envp, &i, buf, size, &len, | 119 | if (add_uevent_var(env, "NAME=%s%d", adev->type, adev->number)) |
| 121 | "NAME=%s%d", adev->type, adev->number)) | ||
| 122 | return -ENOMEM; | 120 | return -ENOMEM; |
| 123 | 121 | ||
| 124 | envp[i] = NULL; | ||
| 125 | return 0; | 122 | return 0; |
| 126 | } | 123 | } |
| 127 | 124 | ||
diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c index c65f54e0e27f..3312e8f2abe4 100644 --- a/net/bridge/br_sysfs_br.c +++ b/net/bridge/br_sysfs_br.c | |||
| @@ -435,7 +435,7 @@ int br_sysfs_addbr(struct net_device *dev) | |||
| 435 | err = kobject_register(&br->ifobj); | 435 | err = kobject_register(&br->ifobj); |
| 436 | if (err) { | 436 | if (err) { |
| 437 | pr_info("%s: can't add kobject (directory) %s/%s\n", | 437 | pr_info("%s: can't add kobject (directory) %s/%s\n", |
| 438 | __FUNCTION__, dev->name, br->ifobj.name); | 438 | __FUNCTION__, dev->name, kobject_name(&br->ifobj)); |
| 439 | goto out3; | 439 | goto out3; |
| 440 | } | 440 | } |
| 441 | return 0; | 441 | return 0; |
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 909a03d6c0e9..6628e457ddc0 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
| @@ -396,28 +396,22 @@ static struct attribute_group wireless_group = { | |||
| 396 | #endif /* CONFIG_SYSFS */ | 396 | #endif /* CONFIG_SYSFS */ |
| 397 | 397 | ||
| 398 | #ifdef CONFIG_HOTPLUG | 398 | #ifdef CONFIG_HOTPLUG |
| 399 | static int netdev_uevent(struct device *d, char **envp, | 399 | static int netdev_uevent(struct device *d, struct kobj_uevent_env *env) |
| 400 | int num_envp, char *buf, int size) | ||
| 401 | { | 400 | { |
| 402 | struct net_device *dev = to_net_dev(d); | 401 | struct net_device *dev = to_net_dev(d); |
| 403 | int retval, len = 0, i = 0; | 402 | int retval; |
| 404 | 403 | ||
| 405 | /* pass interface to uevent. */ | 404 | /* pass interface to uevent. */ |
| 406 | retval = add_uevent_var(envp, num_envp, &i, | 405 | retval = add_uevent_var(env, "INTERFACE=%s", dev->name); |
| 407 | buf, size, &len, | ||
| 408 | "INTERFACE=%s", dev->name); | ||
| 409 | if (retval) | 406 | if (retval) |
| 410 | goto exit; | 407 | goto exit; |
| 411 | 408 | ||
| 412 | /* pass ifindex to uevent. | 409 | /* pass ifindex to uevent. |
| 413 | * ifindex is useful as it won't change (interface name may change) | 410 | * ifindex is useful as it won't change (interface name may change) |
| 414 | * and is what RtNetlink uses natively. */ | 411 | * and is what RtNetlink uses natively. */ |
| 415 | retval = add_uevent_var(envp, num_envp, &i, | 412 | retval = add_uevent_var(env, "IFINDEX=%d", dev->ifindex); |
| 416 | buf, size, &len, | ||
| 417 | "IFINDEX=%d", dev->ifindex); | ||
| 418 | 413 | ||
| 419 | exit: | 414 | exit: |
| 420 | envp[i] = NULL; | ||
| 421 | return retval; | 415 | return retval; |
| 422 | } | 416 | } |
| 423 | #endif | 417 | #endif |
diff --git a/net/wireless/sysfs.c b/net/wireless/sysfs.c index 2d5d2255a27c..29f820e18251 100644 --- a/net/wireless/sysfs.c +++ b/net/wireless/sysfs.c | |||
| @@ -53,8 +53,7 @@ static void wiphy_dev_release(struct device *dev) | |||
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | #ifdef CONFIG_HOTPLUG | 55 | #ifdef CONFIG_HOTPLUG |
| 56 | static int wiphy_uevent(struct device *dev, char **envp, | 56 | static int wiphy_uevent(struct device *dev, struct kobj_uevent_env *env) |
| 57 | int num_envp, char *buf, int size) | ||
| 58 | { | 57 | { |
| 59 | /* TODO, we probably need stuff here */ | 58 | /* TODO, we probably need stuff here */ |
| 60 | return 0; | 59 | return 0; |
