X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=drivers%2Famba%2Fbus.c;h=6b94fb7be5f280bbe2a8e5c0ddace6355cae0185;hb=68b90ee7c8046864301823d8d4449eb1ce1d2f74;hp=fd5475071accea2d48ff5ec7f15270d61409a27b;hpb=f0eef25339f92f7cd4aeea23d9ae97987a5a1e82;p=linux-2.6 diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index fd5475071a..6b94fb7be5 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -44,17 +44,13 @@ static int amba_match(struct device *dev, struct device_driver *drv) } #ifdef CONFIG_HOTPLUG -static int amba_uevent(struct device *dev, char **envp, int nr_env, char *buf, int bufsz) +static int amba_uevent(struct device *dev, struct kobj_uevent_env *env) { struct amba_device *pcdev = to_amba_device(dev); + int retval = 0; - if (nr_env < 2) - return -ENOMEM; - - snprintf(buf, bufsz, "AMBA_ID=%08x", pcdev->periphid); - *envp++ = buf; - *envp++ = NULL; - return 0; + retval = add_uevent_var(env, "AMBA_ID=%08x", pcdev->periphid); + return retval; } #else #define amba_uevent NULL