Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

uevent environment changes fallout

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Al Viro and committed by
Linus Torvalds
7ac0326c 4735b37c

+6 -19
+4 -11
drivers/mmc/core/sdio_bus.c
··· 96 96 } 97 97 98 98 static int 99 - sdio_bus_uevent(struct device *dev, char **envp, int num_envp, char *buf, 100 - int buf_size) 99 + sdio_bus_uevent(struct device *dev, struct kobj_uevent_env *env) 101 100 { 102 101 struct sdio_func *func = dev_to_sdio_func(dev); 103 - int i = 0, length = 0; 104 102 105 - if (add_uevent_var(envp, num_envp, &i, 106 - buf, buf_size, &length, 103 + if (add_uevent_var(env, 107 104 "SDIO_CLASS=%02X", func->class)) 108 105 return -ENOMEM; 109 106 110 - if (add_uevent_var(envp, num_envp, &i, 111 - buf, buf_size, &length, 107 + if (add_uevent_var(env, 112 108 "SDIO_ID=%04X:%04X", func->vendor, func->device)) 113 109 return -ENOMEM; 114 110 115 - if (add_uevent_var(envp, num_envp, &i, 116 - buf, buf_size, &length, 111 + if (add_uevent_var(env, 117 112 "MODALIAS=sdio:c%02Xv%04Xd%04X", 118 113 func->class, func->vendor, func->device)) 119 114 return -ENOMEM; 120 - 121 - envp[i] = NULL; 122 115 123 116 return 0; 124 117 }
+2 -8
drivers/ssb/main.c
··· 321 321 return 0; 322 322 } 323 323 324 - static int ssb_device_uevent(struct device *dev, char **envp, int num_envp, 325 - char *buffer, int buffer_size) 324 + static int ssb_device_uevent(struct device *dev, struct kobj_uevent_env *env) 326 325 { 327 326 struct ssb_device *ssb_dev = dev_to_ssb_dev(dev); 328 - int ret, i = 0, length = 0; 329 327 330 328 if (!dev) 331 329 return -ENODEV; 332 330 333 - ret = add_uevent_var(envp, num_envp, &i, 334 - buffer, buffer_size, &length, 331 + return add_uevent_var(env, 335 332 "MODALIAS=ssb:v%04Xid%04Xrev%02X", 336 333 ssb_dev->id.vendor, ssb_dev->id.coreid, 337 334 ssb_dev->id.revision); 338 - envp[i] = NULL; 339 - 340 - return ret; 341 335 } 342 336 343 337 static struct bus_type ssb_bustype = {